═══ 1. Installation Help ═══ If you are using OS/2 1.3 you must use Pmcomm 1.11. If you are using OS/2 2.0 without the service pack then you can use either Pmcomm 1.11 or Pmcomm 2.01. Pmcomm 2.10 and later can only be run on OS/2 2.1 or OS/2 2.0 with the service pack. To obtain either Pmcomm 1.11 or 2.01 you may download them from our BBS (503 883-8197). There are now two ways to install Pmcomm. First Pmcomm comes with an install program which will install both Pmcomm and the host mode. To use this method open the drive object for the drive that you are using to install Pmcomm from, and double click on the install.exe program. This program will copy the files to the specified directory and create objects on the Desktop for Pmcomm and various other programs. The second method that can be used to install Pmcomm is to copy all of the files on the distribution disk to a directory on your hard disk. Also, copy RxPmcomm.dll and RxPmc32.dll into a .dll directory (i.e. C:\os2\dll). The RxPmc32.dll can only be used with OS/2 2.0 or later. Pmcomm can be run from a command line by typing pmcomm, but it is recommended that it be installed in a "Group" under OS/2 1.3 or as an object under OS/2 2.0 or 2.1. If you used the install program the object will automatically be created. To install Pmcomm in a group under OS/2 1.3, access the Program menu on the "Group" menu and chose the New option. This will bring up a dialog box where the following information must be entered. Program title: Pmcomm Path and filename: user_specified_path\pmcomm.exe Parameters: setup.dat Working directory: user_specified_path Program type: Presentation Manager The final step is to select the Add option at the bottom of the dialog box. Note: setup.dat will be created if not in existence. To install Pmcomm as an object under OS/2 2.0 or 2.1, open the OS/2 System object on the desktop and access the Template icon. Now, drag the Program onto the desktop. When the settings dialog box comes up type the path to Pmcomm and the filename Pmcomm.exe in the edit field reserved for that purpose. Close the settings box and Pmcomm is on There is a program called timer.exe that is included with Pmcomm that will allow you to execute Pmcomm at specified times. This will allow you to set up a script to have Pmcomm dial numbers at certain times and capture mail, download files, etc. To install Pmcomm's Host Mode see Installing_Pmcomm_Host_Mode. ═══ 2. Command line options ═══ Pmcomm allows you to pass either the name of a setup file, or the name of a script, on the command line. If the name of the file you pass has the extension .dat, then the file will be treated as a setup file. If the .dat file does not exist then Pmcomm will create it. If the file you pass has the extension .cmd then it will be treated as a REXX script and executed on startup of Pmcomm. Similarily, a file with the extension of .exe will be treated as an external executable file. All other valid extensions, including the lack of an extension, will be treated as an internal script. ═══ 3. Extended Help ═══ There is a collection of utilities in the File section such as; Scripts, Capture, Log File, File Import, Extended Scroll Buffer, and Print. In the Edit section there are commands such as Copy, Append, Paste, and Clear_Screen. These commands will help you manipulate on-screen information. The Connect command allows you to connect to another computer, either through a modem, using the Dial command or direct connect, using the Send_Break command. The Initialize Modem command will send the modem initialization string to the modem. This command allows the user to re-initialize the modem without exiting and rerunning Pmcomm. Transfer allows the use of different protocols to send and receive files to or from a remote computer. The protocol options are Xmodem_Checksum, Xmodem_CRC, 1K-Xmodem, Ymodem(batch), Ymodem-g(batch), Zmodem, Kermit, CISB, ASCII, and IND$FILE (for downloads). Zmodem is probably the best selection when available on the remote computer. Ymodem-G should only be used with error correcting modems. Hang-up sends the hang-up command string (see the Option menu) and optionally drops the DTR line to the modem. Dropping DTR is the most effective if your modem is setup to hang-up when DTR is dropped. Using a hang-up string is also slower, because Pmcomm has to get the modem into the command state before sending the hang-up string. If you have DTR on and delete the hangup string the hang-up will be much faster. Option allows you to tailor Pmcomm to your own tastes. The areas in option are Port, Dial_Setup, Modem, Protocols, Paths, Macros_Setup, Screen, Status_Line, Terminal, and Chat. The setup is not automatically saved. This allows you to change things temporally without changing your default setup file. If you do want to make the changes permanent be sure to save the setup file. To save the current setup file, use the Save_setup command under the File menu option. Macros allows you to pick, with a mouse, the macro you wish to send. Macros can also be selected with an Alt+corresponding number keystroke. Pmcomm allows you to set up ten different macros. Scripts can be executed from macros by using the shell command. An example of this would be: shell("c:\pmcomm\plane.cmd"); This would execute the REXX script called plane.cmd. This allows you a quick and easy way to execute often used scripts. ═══ 3.1. Keys Help ═══ The following is a list of "Hot keys" available. F1 = Help. F3 = Exit. Alt-D = Dialing directory. Alt-H = Hangup. Alt-Q = Dial Queue entries. Alt-X = Exit. Ctrl-Break = Send break. Ctrl-Insert = Copy. Alt-Insert = Append. Shift-Insert = Paste. Page-Dn = Download. Page-Up = Upload. Print Scrn = Prints text in the visible window (full line length). The up and down arrow keys default to scrolling the window. You can change this in the setup terminal dialog box so that when in ANSI mode the arrow keys will be sent to the modem. In VT100 mode, some keys have been changed to try to closely emulate the VT100 keyboard. F1-F4 are now the PF keys. Because of this the F1 key will not display the normal help, and F3 will not exit the program. The PF keys will send the following characters: F1 = ESCOP F2 = ESCOQ F3 = ESCOR F4 = ESCOS Where ESC is equal to the ASCII character hex 1B. All other hot keys will not be available. In VT220 mode additional keys have been redefined. While in this mode Pmcomm is not CUA compliant, because of the need to use some of the hot keys that OS/2 would normally use. In VT220 mode the F1-F4 keys will send the same characters as in VT100. In addition VT220 will also use other functions keys as follows: F5 = BREAK (sends a break signal) F6 = CSI17~ F7 = CSI18~ F8 = CSI19~ F9 = CSI20~ F10 = CSI21~ F11 = CSI23~ F12 = CSI24~ Alt/F1 = CSI23~ (VT220 F11 function key) Alt/F2 = CSI24~ (VT220 F12 function key) Alt/F3 = CSI25~ (VT220 F13 function key) Alt/F4 = CSI26~ (VT220 F14 function key) Alt/F5 = CSI28~ (VT220 F15 function key) Alt/F6 = CSI29~ (VT220 F16 function key) Alt/F7 = CSI31~ (VT220 F17 function key) Alt/F8 = CSI32~ (VT220 F18 function key) Alt/F9 = CSI33~ (VT220 F19 function key) Alt/F10 = CSI34~ (VT220 F20 function key) CSI will be one of two values, either the CSI character or the ANSI ESC[. If you are connected with 8 data bits and the host supports the 8 bit sequence then the CSI character will be used. When the num lock key is off the numerical key pad will be in the application mode. If you are connecting to a VT220 Host you can use these keys to send the VT220 PF key values. For example pressing the 1 on the numeric key pad will send the VT220 PF1 key. Pressing the 3 on the numeric key pad will send the VT220 PF3 key, and so on. With the num lock on the numbers will be sent. The plus key has been re-mapped to be a comma, again to be compatible with the VT100 keyboard. ═══ 3.2. Button Bar Help ═══ The Button Bar allows, with the click of a mouse button, the user to execute various utilities and any user defined macros. The name of the macro will appear on the button. Phone Button There are many options that can be accessed by the Phone Button. If the telephone is on-hook (hung up) and you click on the button, Pmcomm will dial any numbers that you have selected in the dialing directory. If there aren't any numbers selected, Pmcomm will "pop" up the dialing directory. If you select a dialing directory in File Manager and hold down the right mouse button you can drag the dialing directory to the phone button. Once the mouse button is released over the phone button, Pmcomm will dial any selected numbers. If there aren't any numbers selected, Pmcomm will "pop" up the dialing directory. Once online the phone button will be taken off-hook. If the phone is off-hook and you click on the button, Pmcomm will hang-up. If Monitor DCD is turned off and you click on the button, Pmcomm will dial any selected numbers in the dialing directory. If there aren't any numbers selected, Pmcomm will "pop" up the dialing directory. Disk Button The Disk Button allows a quick and easy way to turn the Capture option on and off. If only the disk appears on the button and you click on the button Pmcomm will then prompt you for the filename of the capture file. If the disk appears to have arrows pointing it, Pmcomm is already executing the Capture command. If you click on the button when it is in this form, Pmcomm will cancel the Capture command. Log Buttom By clicking on the Log Button, Pmcomm will turn logging on. When logging is on, the log will appear with logging equipment (crosscut saw and an axe), if you click on this button Pmcomm will turning logging off. Printer Button By clicking on the Printer Button you can print any selected text. If there isn't any selected text, Pmcomm will execute the Print Continuous command. Clicking on the button again will turn the Print Continuous command off. Generator Button Clicking on the Generator Button will turn on the Script Generator. Pmcomm will then prompt you for a filename for the script. If you click on the button again, Pmcomm will turn off the Script Generator. The Generator Button will have yellow arrows pointing away from the generator when a script is being generated. Book Button Clicking on the Book Button will execute a script. If Pmcomm is executing a script, clicking on the button will cancel the script. You can also use the drag and drop feature of Pmcomm to select any executable file (extensions .exe, .cmd and .scr) from the File Manager and executing that file by dragging and dropping the file on the Book Button. Port Button Clicking on the Port Button will access the Port Setup dialog box. This allows the user to make any changes to the port setup as needed. Scroll Button Clicking on the Scroll Button accesses Pmcomm's Extended Scroll Buffer. ═══ 4. File ═══ There is a collection of utilities in this section such as; Save_setup, Scripts, Capture, Log File, File Import, Extended Scroll Buffer, and Print. ═══ 4.1. Save Setup ═══ Saves user definable configurations as well as screen size and position. The default file name that is used for the setup file is setup.dat. Different setup file names can be used by specifying a different file name as a parameter when starting Pmcomm. You can use any name as long as it has an extension of dat. ═══ 4.2. Capture ═══ Capture saves everything that is received from the modem to a file. For example, you can capture all new messages and then read them after you hang up. If you specify PRN as the filename everything will be captured to the printer. If you have Monitor_DCD selected then the capture file will be closed when you log off. This will happen if you started the capture file from the menu or from a internal script. ═══ 4.2.1. Start Capture ═══ When selecting this option you will be prompted for a file name and then everything that comes in from the modem will be saved to that file. If PRN is selected then everything will be sent to the printer. If the file exists you will be asked if you wish to overwrite the file. If you select no, the new information will be appended to the end of the file. Select cancel if you wish to abort the capture. You may also start the capture by clicking on the disk button located on the Button_Bar. ═══ 4.2.2. Cancel Capture ═══ This command will turn off capture. This command will only work if capture was started with the Start_Capture command. You may also cancel the capture command by clicking on the disk button located on the Button_Bar. ═══ 4.3. Scripts ═══ Scripts allow you to have the computer perform certain tasks automatically. The internal commands available are: wait_for puts sleep call capture_on capture_off change_option dial shell exit The REXX commands that are available are: init_dll init_32dll setcom sendb dcd char_avail read_timeout Get_ch ring_detect drop_dtr raise_dtr Wait_for Wait_fore Put_s Sleep beep get_cursor_position get_char_at capture_on capture_off change_option dial get_dial_memo clipboard_paste clipboard_copy clipboard_append xmodem_send xmodem_receive xmodem_chk_send xmodem_chk_receive xmodem_1k_send xmodem_1k_receive ymodem_send ymodem_receive ymodemg_send ymodemg_receive zmodem_send zmodem_receive kermit_send kermit_receive ascii_send ascii_receive cisb_send cisb_receive set_download_path os2_shell The 'C' library commands that are available are: init_lib setcom sendb dcd char_avail read_timeout get_ch ring_detect drop_dtr raise_dtr wait_for wait_fore put_s sleep beep get_cursor_position get_char_at capture_on capture_off change_option dial get_dial_memo clipboard_paste clipboard_copy clipboard_append xmodem_send xmodem_receive xmodem_chk_send xmodem_chk_receive xmodem_1k_send xmodem_1k_receive ymodem_send ymodem_receive ymodemg_send ymodemg_receive zmodem_send zmodem_receive kermit_send kermit_receive ascii_send ascii_receive cisb_send cisb_receive set_download_path os2_shell The scripts command is only available in the commercial version of Pmcomm. ═══ 4.3.1. Start Scripts ═══ With this command you can start a pre-written script at any time, just enter the file name of the script when prompted. If only the file name is entered, the script path will be searched for the file. Full path and file names are allowed. You may also start a script be clicking on the book button located on the Button_Bar. ═══ 4.3.2. Script Dialog ═══ The Script Dialog displays information and options about the current script. When the dialog is displayed you have the option of either aborting the script, closing the dialog box, or skipping the currently executing command. ═══ 4.3.3. Cancel Script ═══ This command is used to stop a script that is already running. The script will be canceled at the time this is selected unless the script is at a sleep command. In this case the script will stop after the sleep time interval has expired. You may also cancel a script by clicking on the book button located on the Button_Bar. ═══ 4.3.4. Start Script Generator ═══ This is the command that executes Pmcomm's script generator. The script generator will write a script in either REXX or Internal script syntax. A REXX script must have a cmd extension, and an Internal script must have a scr extension. If you want a script that will log you on to a BBS turn the script generator on and log on normally. Once finished logging on cancel the script generator. You now have a script that will log you onto that BBS. If you start the script generator before you dial the remote system a dial command will be in the script. With this script you can just start the script and the script will dial the number. If you start the script generator after connected to the remote system, the script that will be created is designed to be entered into the dialing directory. In some cases you may have to start the script generator before you dial and then delete the dial command from the script. Some remote systems send information as soon as you connect, this does not allow the user enough time to start the script generator. You may also start the script generator by clicking on the generator button located on the Button_Bar. ═══ Filename ═══ Pmcomm allows you to choose either a path and filename or just the filename. If only the filename is entered, Pmcomm will use the script directory that is setup under the Paths option. Be sure that all REXX scripts have an extension of .cmd and all Internal scripts have an extension of .scr. If these extensions are not used Pmcomm will create the script but the script will not be able to be executed. ═══ Description ═══ This description will appear as the first line of the script. The description will hopefully avoid any confusion about the purpose of the script at later date. ═══ REXX Script ═══ This will create a script using the REXX language. The filename must have an extension of .cmd in order for it to be executed by the REXX interpreter. A REXX script will execute a little slower than an Internal script, but it is more flexible. ═══ Internal Script ═══ This will create a script using Pmcomm's Internal script syntax. The filename must have an .scr extension in order for it to be executed by Pmcomm. ═══ Number of Characters in wait_fore ═══ The Number of Characters in wait_fore will decide the length of the wait_fore statements. The default is 10 characters which for most purposes will be adequate. ═══ 4.3.5. Cancel Script Generator ═══ This command turns off the script generator. You can also cancel the script generator by clicking on the generator button located on the Button_Bar. ═══ 4.4. Log File ═══ Logging writes to a file named pmcomm.log in the main pmcomm directory. The type of information written is the time, date and name of the number called. The time, date, cps and name of files transferred will also be saved. If you are setup to monitor DCD the time and date of when the call was terminated will also be recorded. ═══ 4.4.1. Start Logging ═══ The file named pmcomm.log in the main pmcomm directory will be opened. Any logging information will be appended to the end of the file. You may also start logging by clicking on the log button located on the Button_Bar. ═══ 4.4.2. Cancel Logging ═══ The log file will be closed and no other information will be written to the log file until it is reopened using the Start Log option. You may also cancel logging by clicking on the log button located on the Button_Bar. ═══ 4.5. File Import ═══ This command copies a file from disk and sends it to a remotely connected computer. This can be handy for sending previously saved files as messages, or during a chat session. At times this is handier then using the clipboard. The delay time specified in the file import delay parameter under Options, Protocols, will pause the specified number of seconds after each line has been sent. This can be useful if the receiver can not process the information as fast as Pmcomm can send it. ═══ 4.6. Extended Scroll Buffer ═══ The extended scroll buffer allows a user to store information in memory, that can later be displayed. As information comes in from the com port Pmcomm will store it in both the regular scroll buffer (accessed by using the scroll bars), and into the extended scroll buffer (accessed by using this command). The size of the extended buffer can be set under Options, Screen. The extended scroll buffer size will be rounded down to the nearest 4K (4096 bytes) in size. This is to make the memory usage more efficient in OS/2. The user has the ability to read and write to the extended scroll buffer. A user can copy information from the extended scroll buffer into the OS/2 clipboard. Once in the OS/2 clipboard the information can be pasted into word processors, spread sheets, etc.. A user can also import a text file into the extended scroll buffer and then send the file to the modem. ═══ 4.6.1. File ═══ There is a collection of functions under this menu option that allows a user to transport the text in various ways. The functions are: Import text file Save as Print selected Print all Exit buffer Import Text File This function allows the user to import a text file into the extended scroll buffer. Save as This function allows the user to save the text in the extended scroll buffer to a file. Print selected If any text in the buffer has been highlighted with the mouse, selecting this function will send the selected text to the printer. Print all This function will send all of the text, in the buffer, to the printer. Exit buffer This will exit the extended scroll buffer and return you to the main screen of Pmcomm. ═══ 4.6.2. Edit ═══ There are a collection of functions under this menu option that allow a user to manipulate text in the extended scroll buffer. The functions are: Search Find next Copy Paste Cut Clear selected Clear all Undo Search This function allows the user to search for any character sequence that may be in the extended scroll buffer. The search always starts at the top of the extended scroll buffer. Find next This function allows the user to find the next occurrence of the selected character sequence. Copy This function copies any selected text into the clipboard. The text can then be pasted into other applications as well as the main terminal screen of Pmcomm. Paste This inserts any text that is in the clipboard into the extended scroll buffer. Cut This command deletes the selected text from the extended scroll buffer but saves a copy of the text in the clipboard so it can be pasted at another location. Clear selected This command deletes all selected text from the extended scroll buffer. Clear all This command clears the entire extended scroll buffer of any text. Undo This command will undo the last editing command. ═══ 4.6.3. Options ═══ There are two functions under this menu option that allows a user to manipulate the screen appearance. The functions are: Font Color Font This command allows the user to change the font characteristics in the extended scroll buffer. All of the fonts available for OS/2 2.0 are recognized by Pmcomm. Color This command allows the user to set both the foreground and background colors in extended scroll buffer. ═══ 4.7. Print ═══ Print allows you to send information that was previously received out to the printer. You can either send the information that is displayed on the visible part of the window, or you can print the whole scroll back buffer. The print function uses PRN as the device name for printing. ═══ 4.7.1. Print visible screen ═══ This command can also be sent by pressing the Print Screen key. When Pmcomm receives this message it prints all of the lines on the visible part of the screen. ═══ 4.7.2. Print buffer ═══ When this is selected all of the scroll back buffer is sent out to the printer. There are about 240 lines available in the scroll back buffer, so this command may take awhile to complete. This does not mean that you can't do anything else. Pmcomm will print in the background while you go on. ═══ 4.7.3. Print selected ═══ This will print previously selected text (by using the mouse) to the PRN device. You may also print any selected text by clicking on the printer button located on the Button_Bar. ═══ 4.7.4. Print continuous ═══ This will print everything that comes in from the communication port to the PRN device. Start continuous printing This will start continuous printing. Everything will be printed to the PRN device. It is not recommended that you use this command unless you have the OS/2 print spooler active. You may also start continuous printing by clicking on the printer button located on the Button_Bar. Cancel continuous printing This will cancel printing, that was started with the Start continuous printing command. You may also cancel continuous printing by clicking on the printer button located on the Button_Bar. ═══ 4.8. Product Information ═══ The product information box has information about this program, such as BBS support telephone number, company name, version number, serial number, and copyright information. ═══ 4.9. Exit ═══ Ends current session with Pmcomm. Before exiting Pmcomm will restore the state of the com port. Pmcomm closes the communication port when exiting which drops DTR. The hang-up string is also sent to the modem, after the main Pmcomm window disappears. Because of this if Pmcomm is immediately rerun the com port may not be able to be reopened until the previous execution of Pmcomm completes. If you get a device open error when doing this, just wait a few seconds and try again. ═══ 5. Edit ═══ In this section there are commands such as Copy, Append, Paste, and Clear_Screen. ═══ 5.1. Copy ═══ Copy transfers selected information from the screen and places it into the Clipboard. Any information already in the Clipboard, will be deleted. Other applications, such as a word processor, can then use this information. ═══ 5.2. Append ═══ Append adds selected text to information that is already in the Clipboard. If there is existing information of the same type (CF_TEXT), then the selected text will be added to the end of the existing information. One use of this would be to save file names into the Clipboard, so they maybe used to download. ═══ 5.3. Paste ═══ Paste, copies information from the clipboard and sends it out to the modem. Care must be taken that the information sent can be handled by the remote computer. A use for this command would be that you could enter a message in a word processor, copy that message into the clipboard and then paste it into Pmcomm. ═══ 5.4. Clear Screen ═══ Clears the whole screen including the scroll back buffer and resets the attribute to the attribute defined in the setup area. ═══ 6. Connect ═══ This command allows you to connect to another computer, either through a modem, using the Dial command or direct connect, using the Send_Break command. ═══ 6.1. Dial ═══ Dial uses a dialing_directory to store phone numbers and other information about the remote computer. This provides a easy way to connect to remote computers. ═══ 6.1.1. Dial Dialog Help ═══ The dial dialog box allows you to add, select, modify, or delete entries in the current dialing directory. An entry can also be selected to be automatically selected (or optionally dialed) when Pmcomm is first started. To add an entry, select the add button in the dialog box. You will then be prompted to enter the name of the new entry. The directory will be sorted and the new entry will be selected. The cursor will be positioned at the number entry field so that the number for the new entry can be entered. After the number has been entered, pressing the enter key will save the dialing directory and dial the number(s). Pressing the tab key will allow you to edit the other fields. To select a number, using a mouse, "click" on the number (or numbers) that you wish to dial. To deselect an entry "click" on the number once again. If you are not using a mouse the arrow keys will move the highlight bar through the directory. To select your choices press the space bar, a second time will deselect the entry, then press enter. Multiple entries may be selected. This will form a dialing queue, in which Pmcomm will dial the selected entries until a connection is made. To modify an entry, select the entry to be edited and then use the tab key to move the cursor to the field you wish to change. Use the Change button to change the name of an entry. Pressing the save button will save the modifications to the disk. To change a name, select the entry to be edited and then use press the change button. The change will automatically be saved to the disk. To delete an entry, select the entry to be deleted and select the delete button in the dialog box. Information for each number such as last time called, number of times called, file cps on downloading, file cps on uploading, files downloaded, files uploaded and protocol, can be accessed by selecting an entry and then clicking on the Info button. CAUTION: If multiple entries are selected, only the first selected entry will be deleted. The dial dialog box can also be accessed by clicking on the phone button on the Button_Bar. ═══ 6.1.2. Dial Prefix ═══ Pmcomm sends the selected dial prefix to the modem before sending the phone number. The default string for the prefixes is ATDT which tells the modem to dial using tone (ie. touch tone). If your phone system does not support touch tone then you could use the ATDP command. Pmcomm allows you to setup multiple prefixes, so that if you need to dial a special code for long distance calls you can set up a separate prefix for those calls. ═══ 6.1.3. Dial Suffix ═══ Pmcomm sends the selected dial suffix to the modem after sending the phone number. The default string for the suffixes is ^M which is a carriage return and line feed. ═══ 6.1.4. Automatically Selected ═══ If a dialing entry is marked as being automatically selected then each time Pmcomm is started this entry will be selected to be dialed. You can have as many entries automatically selected as you want, and this will form a dialing queue. A dialing queue allows you to try the first number and if it is busy it will then dial the next number in the queue. If the Dial Auto Selected Entries on program Startup is selected then any entries in the dialing directory that are marked as auto selected, will automatically be dialed. This option will allow you to automatically dial selected numbers when Pmcomm is first invoked. ═══ 6.1.5. Dial List Box ═══ The Dial List Box is a multiple selection list box. This means that you can select more than one entry at a time. The information on the right side of the Dialog Box is on the first item selected. The reason for using a multiple selection list box, is that you can select more than one item and these items will be dialed in order. For example, if the first number selected is busy then Pmcomm will dial the next number selected. If all selected numbers are busy, Pmcomm will start over again. If you have multiple items selected and select the Delete button, only the first item will be deleted. If an item is selected and you double click on that item then the selected items will be dialed. ═══ 6.1.6. Baud Rate ═══ In the Dialing Dialog Box you can enter any baud supported by the device driver you are using. Currently the maximum baud rate supported by the device driver included with OS/2 is 115,200. Commonly used baud rates are: 300, 1200, 2400, 9600, 19200 and 38,400. To select a baud rate use the drop down list box and choose the appropriate rate. If you select the Default option for the baud rate Pmcomm will use the baud rate set up under Options, Port and the default baud option. ═══ 6.1.7. Parity ═══ The supported parities are: None, Even, Odd, Marked, and Space. To enter a parity, type in one of the above words. The two most widely used parities are None and Even. If you are calling most BBS's you would want to enter None, but most packet networks (such as CompuServe and Telenet) normally require Even parity. ═══ 6.1.8. Data Bits ═══ Currently supported data bits are 5, 6, 7, and 8. The most popular values are 7 and 8. For most BBS's 8 data bits are necessary, however, for systems such as CompuServe, 7 data bits are required. ═══ 6.1.9. Stop Bits ═══ Currently supported stop bits are 1, 1.5 and 2. Most systems will require 1 stop bit. ═══ 6.1.10. Dial Script ═══ The script name can be up to 12 characters long. The script must be in the script path (see Paths for more information). Any REXX script, Internal script, or any OS/2 executable can be executed. Once Pmcomm is connected to the remote computer this script will be executed. ═══ 6.1.11. Dial Terminal ═══ The currently available terminal emulations are TTY, ANSI, VT100, and VT220. Pmcomm will switch to the terminal emulation listed once connected to the remote computer. ═══ 6.1.12. Dial Memo ═══ The Dial Memo field allows a user to store information that pertains to that number. An example would be to store a password in this field, so that a user would not forget what their password is. A user can setup a macro key to send the information in the memo field (see Macros_Setup, for more information). ═══ 6.2. Send Break ═══ Some computers when directly connected with a serial cable, need a break signal in order to initialize a connection. See your system administrator to see if this needs to be used with your system. ═══ 6.3. Initialize Modem ═══ Pmcomm automatically sends the modem initialization string to the communications port when the user first starts Pmcomm. If for some reason you need to re-initialize the modem, you can use the Initialize Modem command to do so. ═══ 6.4. Comm Error ═══ When this command is used, Pmcomm queries the com device driver to see if the com device driver has detected an error. There are four error messages that can be displayed. The first is "Receive queue overrun", which means that there was no room in the device driver receive queue for a character read in from the receive hardware. This is normally caused by the flow control not being setup correctly. Make sure that you have hardware flow control turned on, in both your modem and in Pmcomm. The second message is "Receive hardware overrun", and means that a character was not read from the hardware before the next character arrived causing a character to be lost. When this error is received, it normally means that you are trying to receive characters faster then your hardware is capable of. Try reducing the baud rate that you are connected at. This error is more likely to happen with a non-buffered UART, and on an ISA bus computer. The third message is "Hardware detected parity error", and the fourth message is "Hardware detected framing error". These last two messages are normally caused by phone line noise, and by themselves, are not normally a problem. After the errors are displayed, Pmcomm clears the errors and they will not be displayed again, unless the error occurs again. ═══ 7. Transfer ═══ Transfer allows the use of different protocols to send and receive files from a remote computer. The protocol options are Xmodem_Checksum, Xmodem_CRC, 1K-Xmodem, Ymodem(batch), Ymodem-g(batch), Zmodem, Kermit, CISB, and ASCII. Zmodem is probably the best selection, when available on the remote computer. Ymodem-G should only be used with error correcting modems. IND$FILE is available for downloads using the VT100, and VT220 terminal emulations only. CAUTION: IND$FILE currently does not have any error detection available in Pmcomm. ═══ 7.1. Transfer Dialog Box Help ═══ This dialog box displays the current status of your file transfer. The box displays the latest status message from Pmcomm, the protocol being used, the file name of the file being transferred, the file size, bytes already transferred, the time remaining, and the current cps (characters per second). There is also a status bar that visually shows the approximate percentage of the file yet to be transferred. The file transfer dialog box has a "Show" button that when pushed will display the main window of Pmcomm. This option allows you to access the main window while doing a transfer. You may do anything you wish as long as it doesn't interfere with the com port (ie. changing the com port settings). One way this would be useful is in viewing the scroll buffer while doing a transfer. Once the show button has been pushed, the button will change to "Hide". If the button is pushed at this time the main window of Pmcomm will be hidden from view. ═══ 7.2. Download ═══ The download command brings up a dialog box for you to select the proper protocol. If the protocol selected is not a batch protocol ( ASCII, Xmodem_Checksum, Xmodem_CRC or 1K-Xmodem ) you will be prompted for a filename. If you have Auto-Zmodem or Auto_CISB selected in the protocol options area, Pmcomm will automatically start transferring as soon as the remote computer starts to send. Zmodem is not available in the demonstration version. ═══ 7.3. Upload ═══ When sending a file to a remote computer you must select the same protocol that the remote computer will use to receive the file. After selecting the proper protocol, a file open dialog box will have you select the file you wish to send. You can either double click on the file name or select the file and click on the OK button. If you have Auto_CISB selected in the protocol options area, Pmcomm will automatically start the transfer as soon as the remote computer sends the transfer request. With a CISB transfer the filename is specified on the host and the file open dialog box is not displayed. You may also use the drag and drop feature of Pmcomm. When files are dragged from a drive object and dropped onto Pmcomm, the transfer protocol that is listed for that phone number will be invoked and the file(s) will be sent to the remote computer. If you have Monitor_DCD selected then drag options will not be allowed until connected with another computer. To drag files from a drive object, select a file (or files) and then click on the selected file(s) with the LEFT mouse button and then press and hold the button RIGHT mouse button down. Once you have begun to drag the files with the mouse the mouse pointer will change shape. If the mouse pointer is over a program that does not accept drag and drop the pointer will again change shape. When the mouse pointer is over any part of Pmcomm you can release the right mouse button. This will drop the files onto Pmcomm and Pmcomm will send them. This will even work if Pmcomm is an icon. To change the protocol for the current phone number, select upload from the menu and then select the protocol you want (make sure that the save to dialing directory is selected). After pressing the OK button the file open dialog box will be displayed. Just press cancel and you can now use the drag and drop with the new protocol. If a file is dropped onto Pmcomm before it has been invoked, while it is an icon in a folder or on the Desktop, this file will be used as a setup file, and Pmcomm will be invoked. ═══ 7.3.1. Xmodem Checksum ═══ Xmodem Checksum is one of the oldest protocols around and some people still use it exclusively. It is a moderately fast protocol that has fairly good error detection. ═══ 7.3.2. Xmodem CRC ═══ Xmodem CRC and Xmodem_Checksum are similar except CRC has better error detection than Checksum. Almost anywhere you call will offer at least one of these protocols. ═══ 7.3.3. 1k-Xmodem ═══ 1k-Xmodem uses the same error detection as Xmodem_CRC, but uses 1024 byte blocks instead of 128 byte blocks. This allows for greater throughput (higher characters per second) with roughly the same error detection. ═══ 7.3.4. Ymodem ═══ Ymodem uses the same error detection and block size as 1k-Xmodem but is a batch protocol. This means that in the first block the file size and name are sent. This keeps the receiver from having to type in the filename. It also allows you to send more than one file without having to start the transfer again. This protocol is second to Zmodem, in our opinion, when using non-error correcting modems. ═══ 7.3.5. Ymodem-g ═══ Ymodem-g is identical to Ymodem except it has no error correction. If an error is detected the transfer aborts. Because of this Ymodem-g should only be used with error correcting modems. Pmcomm will allow you to use this protocol anytime, but again care should be taken on what hardware it is used with. With the proper hardware Ymodem-g has the fastest cps (characters per second). ═══ 7.3.6. Zmodem ═══ Zmodem is almost as fast as Ymodem-g, however Zmodem does support error correction and file recovery. It only takes one aborted Ymodem-g transfer to lose all it's advantages. Zmodem has many advantages as far as the user is concerned. It is probably the easiest protocol to use. If using Pmcomm with the Auto-Zmodem download feature, the whole download is done automatically from the Pmcomm end. You have to select the file from the sender (BBS etc..) and once the sender starts sending, the transfer will begin on Pmcomm. It may take a moment before the sender sends the first sequence, so wait a moment. Some of the advanced features of Zmodem are listed below. Zmodem supports: 1. CRC-32 and CRC-16. The additional error detection of 32 bit CRC is supported. 2. File recovery. If a Zmodem download is aborted for any reason the transfer will resume at the point where it was aborted. You don't have to start the whole transfer over. 3. Auto-Download. When a Zmodem sending program starts up it first sends a rz and then a carriage return. Pmcomm will monitor for the startup sequence and automatically start the Zmodem download. Great care has been taken to make sure that it really is a Zmodem transfer and not someone typing it in at the keyboard (at either end). This feature makes downloading with Zmodem much faster and much easier. 4. Variable length headers. This reduces the amount of overhead that accrues with sending Zmodem headers. This is only used if supported by both the sender and receiver. 5. Variable length receive buffers. Some Zmodem receive programs have problems with writing to the disk and receiving from the communication port at the same time. If necessary Zmodem will wait for an ACK from the receiver after the specified buffer size has been sent. This will only be done if it is requested by the receiver. 6. Retains original file size. Some people say that because Zmodem headers are larger that there is two much overhead. This really isn't the case. For example if comparing Zmodem to Ymodem-g (full flow Ymodem), Ymodem-g has less overhead with each packet. However Ymodem-g rounds the file size up to an even 128 byte size. In some cases it is even rounded up 1024 bytes. This is done because Ymodem (g or otherwise) only supports two block sizes, 128 and 1024 (the block size is actually 133 and 1029 to allow for the block header, STX or SOH, and the CRC value), so it has to send full blocks. However, Zmodem uses variable block sizes. The block sizes adjust from 32 bytes to 1024 bytes. If telephone line quality is poor smaller blocks are sent so that if an error does occur less data will have to be resent. As the line quality improves the size of the blocks will be increased. The starting block size is variable depending on the connected baud rate. 7. Error recovery. Because Zmodem can resend from any place in the file, aborted transfers are rare. By reading this you can tell our favorite protocol is Zmodem. Once you have used Zmodem it's hard to get used to using other protocols. ═══ 7.3.7. ASCII ═══ The ASCII protocol can be used to transfer text files. There is no error detection or correction available with this protocol. It is recommended that one of the other protocols be used, even with text files. ═══ 7.3.8. CISB ═══ The CIS B protocol can be used to transfer files to and from CompuServe. CompuServe B, B+ and Quick B are supported. Quick B is the fastest variant of the B protocol and is automatically selected when it is supported on the host computer. The CIS B protocol is an automatic protocol where the host initiates the transfer and Pmcomm will automatically go into the send or receive mode. If you are sending a file, the file must exist in the download directory of Pmcomm. If Pmcomm is unable to find the file then the transfer will abort. Pmcomm can be configured to ignore the CIS B protocol by deselecting the Automatic CIS B option in the Protocol Option Dialog. Pmcomm may run slightly faster in terminal mode without this selection. Under most systems the difference will not be detectable. Another option for CIS B is for file recovery. What this option will do is if you started a download and aborted the transfer you can then restart the transfer and CIS B will resume from the place where it was aborted. This can be very handy in poor phone line conditions. The packet size for CIS B is adjusted by the connecting baud rate. For example, if you are connected to CompuServe at 2400 baud the packet size will be 1024 bytes. If you connect at 1200 baud the packet size will be 512 bytes. This allows for speedy error recovery in case a error occurs because of phone line noise. Downloads will automatically be placed in the Pmcomm download directory and the download directory will automatically searched for any uploaded files. If you specify a path with the filename when CompuServe asks for a filename for your computer, then this path will be used. CIS B should be the protocol used when transferring files to and from CompuServe. CAUTION: Due to a bug in the initial release of OS/2 2.0, the throughput of the CISB protocol, will be lower than expected at high baud rates. If you are having this problem, contact IBM OS/2 Defect support. You can also select Ymodem from CompuServe, and then Ymodem-g from Pmcomm, and you will receive the file at a high baud rate. This should only be attempted if you have an error correction connection. ═══ 7.3.9. Kermit ═══ Kermit is the slowest protocol offered here and should only be used when no other protocol is available. Kermit does have advantages and it is offered on many minicomputers as well as mainframes. Kermit will also transfer binary files when connected at 7,E,1. The maximum packet size that is allowed is 94 bytes which is one of the reasons that makes Kermit slow. There is a variation of Kermit that allows larger packet size, but it is not implemented in Pmcomm. Kermit allows batch transfers, both in sending and receiving, and will attempt to preserve the file names. If Pmcomm gets an error when trying to create the file name received from the sender it will convert it to a "8.3" type of file name. Kermit allows variable packet sizes so the original file size is maintained. Pmcomm allows you to change the "End of Line" character (also called end of packet), the "Quoting character" (sent before control codes), the "pad character", and the number of pad characters you want. You can also tell Pmcomm to force an 8 bit transfer even if it is on at 7,E,1. This comes in handy if you are downloading files from CompuServe. If this option is not selected and you are on at 7 data bits, Pmcomm will use what is called the 7 bit quoting. The 7 bit quote character that Pmcomm uses is a &. ═══ 7.3.10. IND$FILE ═══ IND$FILE currently is only supported under VT100 and VT220 terminal emulations through a 3708 protocol converter. Because of problems with character conversion through the protocol converter error detection is not currently available. Because of this, files received using IND$FILE maybe CORRUPTED! Use this protocol at your own risk! IND$FILE is not a very efficient protocol because every byte that is transferred must be checked to see if it will pass through a 7 bit data stream and escaped if it will not. This can greatly reduce the amount of data that can be sent in each packet. ═══ PC File Name ═══ This is the file name which will be used on the receiver. If a full path and file name are used the file will reside at that address. If just a file name is specified the file will be stored in the upload directory set in the Paths menu option. This file name must be specified or the transfer will not work. ═══ Host File Name ═══ This is the file name as it resides on the Host. If this filename is not specified, Pmcomm will default to the PC File Name as the Host File Name. ═══ Binary ═══ This option will tell the Host to send the file as a Binary file. ═══ Ascii ═══ This option will tell the Host to send the file as an Ascii file. ═══ CRLF ═══ This option will tell the Host to send a "carriage return line feed" after each record. This option will be needed on most Ascii file transfers while rarely needed with a Binary file transfer. ═══ 7.3.11. Save to Dial Directory ═══ When this option is selected the file transfer protocol that is selected will be saved into the dialing directory for this number. The next time a file transfer is used when connected to this number this same protocol will be selected and all the user will have to do is press the OK button. If you do not want this protocol save then deselect this option. ═══ 8. Hangup ═══ Hang-up sends the hang-up command string (see the Option menu) and optionally drops the DTR line to the modem. Dropping DTR is the most effective if your modem is setup to hang-up when DTR is dropped. Using a hang-up string is also slower because Pmcomm has to get the modem into the command state before sending the hang-up string. If you have DTR on and delete the hang-up string the hang-up will be much faster. The default string is : +++~~~~ATH^M. The +++ is the default modem attention string, which puts the modem into the command state. The ~~~~ will make Pmcomm pause 2 seconds (.5 seconds per ~) and then the ATH will force the modem to go on-hook (hangup). The ^M sends a carriage return line feed combination. ═══ 9. Options ═══ Option allows you to tailor Pmcomm to your own tastes. The areas in option are: Port, Dial_Setup, Modem, Protocols, Paths, Macros_Setup, Screen, Terminal, and Chat. The setup is not automatically saved. This allows you to change things temporally without changing your default setup file. If you do want to make the changes permanent be sure to save the setup file. To save the current setup file, use the Save_setup command under the File menu option. ═══ 9.1. Port ═══ The device name should be a valid communication device name. Some third party device drivers allow you to use names other then COM1, COM2, etc., so Pmcomm does not limit you to these names. Hardware flow control and DTR should be on for most modems. ═══ 9.1.1. Device Open Error Retries ═══ This is the number of attempts Pmcomm will try to open a device. After the specified number of attempts Pmcomm will exit. If 0 is entered, Pmcomm will not retry the device. This option is generally used to access a shared communication port (i.e. modem pool). ═══ 9.1.2. Seconds Between Retries ═══ This is the number of seconds Pmcomm will wait before retrying to open a device. ═══ 9.1.3. Device Name ═══ The device name should be a valid communication device name. Some third party device drivers allow you to use, and in some cases require that you use, names other then COM1, COM2, etc., so Pmcomm does not limit you to these names. If you are using Pmcomm across a LAN then normally there will be an Alias name for the communication port you are using on the server. See your LAN administrator for the Alias name(s) that you should use to access the modem(s). If you get a device open error when trying to open a com port, you can change the com port by just typing in a new com port name. For example if you had COM1 as the device name, and that device is used by your mouse, you will get a dialog box that will allow you to change the name by just typing in the new name. To see if a device is valid, you can go to an OS/2 prompt and type in mode COM1 (where COM1 is the device you want to check). If you get an error from OS/2 about the device not being available, the one of the follow problems exists: 1. Device already in use. 2. The com.sys driver is not installed in your config.sys (not needed if use a com port on a server). 3. OS/2 could not install that com port when you booted your computer. If this last problem exists then you should contact IBM OS/2 defect support for help getting your com port to install. ═══ 9.1.4. Hardware Flow Control ═══ Hardware Flow Control is generally the most reliable method of flow control. There are two basic times when flow control is needed. First, if Pmcomm is sending information to the modem faster than the modem is able to send the information flow control is needed. If flow control is not enabled then a transmission error will occur. Second if the modem is sending information to Pmcomm faster then Pmcomm can receive it, then Pmcomm will try to tell the modem to stop sending the information. This can occur when an excessive amount of processing is being performed on the computer. Hardware Flow Control uses two modem signals to control the flow of information. For send flow control the CTS modem line is used. For receive flow control the RTS modem line is used. If your modem supports these flow control signals, then setup your modem and Pmcomm for Hardware Flow Control. ═══ 9.1.5. XON/XOFF Flow Control ═══ Xon/Xoff Flow Control should only be used when Hardware_Flow_Control is not available and when flow control is necessary. The only two file transfers that will work correctly with Xon/Xoff are ASCII and Zmodem. The only other protocol that should need flow control is Ymodem-g. ═══ 9.1.6. Use DTR ═══ DTR stands for Data Terminal Ready, which by lowering DTR you can signal the device you are communicating with (usually a modem) that you wish to go off line. If you are connected to a modem you should set the modem up to go on-hook when the modem detects a drop in DTR. The command for a Hayes 2400 baud modem is AT&D2. If this option is selected in Pmcomm, then DTR will be dropped when the hangup command is selected, or after each redial attempt. ═══ 9.1.7. Monitor DCD ═══ DCD stands for Data Carrier Detect and is pin 8 on an RS-232C cable. When a carrier is detected by the modem, Pmcomm assumes that you are connected to a remote computer. If DCD is not supported by your modem or other hardware, then this option should be turned off. With this option turned on, if no DCD is present then Pmcomm will not Hangup, or go into a file transfer. The drag and drop from the file manager will also be disabled. The command for a Hayes 2400 baud modem is AT&C1. This will have the modem track the state of DCD. ═══ 9.1.8. Default Baud ═══ The default baud is the baud rate that the communication port is set to when Pmcomm is first executed. The baud rate is changed to the value in the dialing directory when a number is dialed. Normally the default baud should be set to the highest baud rate supported by your modem. If you have Pmcomm connected directly to another computer with a NULL modem cable, then you want to set this baud to the same baud rate that the other computer is using. ═══ 9.1.9. Default Data Bits ═══ This selection allows you to select the number of data bits that will be used when the communications port is initially opened. This option will be overridden with the parameters listed in the dialing directory once you have connected with a remote computer. ═══ 9.1.10. Default Parity ═══ This selection allows you to select the parity that will be used when the communications port is initially opened. This option will be overridden with the parameters listed in the dialing directory once you have connected with a remote computer. ═══ 9.1.11. Default Stop Bits ═══ This selection allows you to select the number of stop bits that will be used when the communications port is initially opened. This option will be overridden with the parameters listed in the dialing directory once you have connected with a remote computer. ═══ 9.1.12. Exit on Hangup ═══ This selection will cause Pmcomm to exit, once you have called a remote computer and then DCD has dropped. You must have monitor dcd selected in order for this command to work. This command is useful if you wish to just call one number and then have Pmcomm exit. ═══ 9.2. Dial Setup ═══ This allows you to select a dialing_directory from a list box and also lets you setup the prefix and suffix of the number to be dialed. There is a list box that will allow you to select how the dialing directory will be sorted. You can sort the dialing directory by name, number, baud rate, last on, number of times called, download cps, upload cps, dial prefix, and dial suffix. You can also select either ascending or descending order. ═══ 9.2.1. Dial Auto Selected Entries ═══ If the Dial Auto Selected Entries on program Startup is selected then any entries in the dialing directory that are marked as automatically_selected , will automatically be dialed. This option will allow you to automatically dial selected numbers when Pmcomm is first invoked. This can be very useful if you dial the same numbers each time you run Pmcomm. ═══ 9.2.2. Sort Dialing Directory ═══ The dialing_directory can be sorted by either the name, phone number, baud rate, last time called, number of times called, download characters per second, upload characters per second, dial prefix, or dial suffix. The directory can be sorted in either ascending or descending order. For example you can sort the dialing directory by last time called in descending order, and all the most recently called numbers will be displayed at the top of the dialing directory. ═══ 9.2.3. Dialing Directory List ═══ A list of the available dialing_directories are displayed in a list box, so that a default directory can be selected. The selected directory will automatically be loaded when Pmcomm is started. You can add additional directories by pressing the add button. ═══ 9.3. Modem ═══ The initialization string should have the commands in it to enable word result codes, hang-up when DTR is dropped and enable hardware flow control. Not all of these are supported by all modems but use them when possible. Pause before redial is the time Pmcomm waits before trying to redial a number. "Seconds to wait for carrier" is how long Pmcomm will wait for a connection before redialing. By clicking on the configure button you may add new modems to Pmcomm. ═══ 9.3.1. Modem Name ═══ These are the names of the modems that you have stored in Pmcomm. The initialization string for that particular modem shows in the Modem Initialization String edit field. To add a new modem or change an existing modem, click on the configure button. ═══ 9.3.2. Modem Initialization String ═══ Initialization string should have the commands in it to enable word result codes, hang-up when DTR is dropped and enable hardware flow control. Not all of these are supported by all modems, but use them when possible. Pmcomm's default modem string is for a Hayes 2400 baud modem. This is the default string: AT&F&D2&C1M0Q0S2=255S10=30X4 ═══ 9.3.3. Modem Pause Before Redial ═══ Pmcomm will pause for the specified number of seconds before attempting to redial a phone number. Some phone systems take a few seconds before you can redial a phone number. The default value is 3 seconds and should work for most phone systems. ═══ 9.3.4. Modem Dial Timeout ═══ Pmcomm will wait for a Connect or Carrier message from the modem for up to 64 seconds. The S7 register of the modem must also be set to a value at least as great as the dial timeout value. This can be done by issuing the following command to the modem: ATS7=30. This would set the modem to timeout after 30 seconds. Setting the dial timeout to a value greater then 30 would not be effective because the modem would still timeout after 30 seconds. The default timeout value for Pmcomm is 60 seconds. ═══ 9.4. Protocols ═══ The options under protocols are: Auto Zmodem Download. Auto Zmodem String. Overwrite Existing Files Rename Duplicate Files Zmodem Resume. Compare File Dates. Ignore File Dates. Zmodem CRC-32. Zmodem CRC-16. Zmodem Variable Headers. Auto CISB Transfer. CISB file recovery. Import File line delay. Force 8 bit transfer. End of line character. Control quote character. Number of pad characters. Pad character. IND$FILE. Auto Zmodem makes Pmcomm check for a Zmodem start sequence. The string that Pmcomm checks for can be changed. This is the Auto Zmodem String. The standard string is an rz followed by a carriage return (to enter a carriage return hold down the ALT key and press 1,3 on the numeric key pad). When this string is received, Pmcomm will automatically start receiving the file. The options to overwrite or rename existing files only are in effect if a Zmodem resume fails. If you have rename selected, and a file exists with that name then Pmcomm will rename the new file with a number for an extension. For example if you have a file called allfiles.txt in your download directory, and you download a file with the same name (without Zmodem resume) the new file will be named allfiles.0. If allfiles.0 exists then the new file will be called allfiles.1. Zmodem resume allows Zmodem to resume a file transfer that was previously aborted. The compare and ignore file dates options, determines if Pmcomm will check the date of the file on the disk, to see if it should resume the transfer. These options are only in effect if the Zmodem resume is selected. Some Zmodem systems do not send the date in the Zmodem header. If a resume is required for these systems, then ignore file dates should be selected. CRC-32 has improved error correction but is slightly slower. If CRC-32 is not available Pmcomm will switch to CRC-16. If the Zmodem Variable headers has been selected then Pmcomm will allow for variable length headers. Use this option only if it is supported by the host. Zmodem is only available on commercial versions. Auto CISB is similar to Auto Zmodem except that both uploads and downloads can be started this way. This feature is for the CISB file transfer protocol. CISB file recovery allows CISB to resume a file transfer that was previously aborted. The IND$FILE protocol may also be selected for downloads. CAUTION: The IND$FILE file transfer protocol in Pmcomm, currently, does not support any error detection. The rest are Kermit options and should be made to match your host. ═══ 9.5. Paths ═══ The working path MUST be set to the path that Pmcomm is installed in. The working path is stored in the os2.ini file. This is done so that the pmcomm.exe file can reside on a server, but yet each requester can have there own setup.dat file. The download path allows you to have the files that you download put into a different directory. The upload path is the path that the fileopen dialog will default to when doing a upload. The script path is where Pmcomm looks for the scripts listed in the dialing directory. The startup script is a script that will be executed each time Pmcomm is started. The default name is startup.scr. The capture path is where all screen captures are stored. These paths must contain a valid directory. It defaults to the directory that Pmcomm was started from. There is also a call logging option here which when turned on will start call logging as soon as Pmcomm is run. ═══ 9.6. Macros Setup ═══ There are 10 user definable keyboard macros. These can be invoked by holding down the Alt key and pressing 1-0 or by clicking on the appropriate button on the Button Bar. Use this option to setup your macros. ═══ 9.6.1. Macro Command ═══ Macros can be implemented by using combinations of the following commands. Use ^M to send a carriage return. When the macro is invoked it will send the string that you have defined to the modem. Once you have setup the macro string, it can also be selected from the main menu using a mouse. Other special characters are: ^H = tab character. ^J = carriage return without a line feed. ^L = form feed. ^[ = escape character (Ascii 27) ^C = send the Ctrl-C character (Ascii 3) ^K = XON character ^S = XOFF character ~ = sleep for half a second You can also send any other special character by holding down the Alt key and typing in the ASCII number on the numeric key pad. For example, if you want to enter the escape character into a macro you could hold down the Alt key and then press the two and the seven on the numeric key pad (while still holding down the Alt key). When you then release the Alt key the escape character would be inserted into the macro. Scripts can be executed from macros by using the shell command. An example of this would be: shell("c:\pmcomm\plane.cmd"); This would execute the REXX script called plane.cmd. This allows you a quick and easy way to execute often used scripts. The information in a memo field (in the dialing directory), for the number connected, can also be sent by entering the word memo in a macro. This would allow a user to send information (such as a password) to the remote computer. By doing this it allows a user to use the same macro key to send different passwords, for each dialing directory entry. ═══ 9.6.2. Macro Name ═══ Enter the name of your macro in this field. We suggest using names that will be meaningful to you at a later date. ═══ 9.7. Screen ═══ This command allows you to tailor the screen handling to your tastes. The best thing to do is try them to see if you like them. Some features like the automatic horizontal scroll will probably only be used when typing messages and chatting. ═══ 9.7.1. Font ═══ Allows you to select from a list of font sizes. The sizes depend on the display adapter and version of OS/2 you are using. Pmcomm queries the video device driver to see what font sizes it supports and lists them for you to select. ═══ 9.7.2. Foreground ═══ Sets up the color to be used for the text used in the Pmcomm window. There are 16 different background and foreground colors available, allowing for 256 different color combinations. ═══ 9.7.3. Background ═══ Sets up the color to be used for the Pmcomm window background. There are 16 different background and foreground colors available, allowing for 256 different color combinations. ═══ 9.7.4. Extended Scroll Size ═══ The Extended Scroll Size options allows you to set the maximum size of the buffer that Pmcomm will use to store the extended scroll information into. When this buffer fills up Pmcomm will delete the oldest information, to allow room for new information. Pmcomm will only allocate memory as it is needed to store the scroll information, and it will not allocate more memory then is set in the Extended Scroll Size option. If the size is set to 0 then Pmcomm will not use the Extended Scroll buffer. ═══ 9.7.5. German Umlaut Filter ═══ This feature will display some special characters that appear in the German language. The translations are as follows: ^U = @ О = [ Щ = \ Ъ = ] Д = { Ф = | Б = } с = ~ ═══ 9.7.6. Hide Window While Dialing ═══ The hide window while dialing option will make the screen less "busy" while dialing. ═══ 9.7.7. Hide Window During a File Transfer ═══ The hide window during a file transfer option will make the screen less "busy" while executing a file transfer. If you use the show button on the file transfer dialog box, the main window will reappear. ═══ 9.7.8. Automatic Vertical Scroll ═══ The Automatic vertical scroll option will make Pmcomm keep the cursor vertically in the Pmcomm window. ═══ 9.7.9. Automatic Horizontal Scroll ═══ The Automatic horizontal scroll option will keep the cursor horizontally in the Pmcomm window. ═══ 9.7.10. Retain Dialing Dialog's Position ═══ The retain dialing dialog's position option will make Pmcomm restore the last position of the dialing dialog each time it is invoked. If this option is not selected then OS/2 will decide where to place the dialog boxes. ═══ 9.7.11. Retain Transfer Dialog's Position ═══ The retain transfer dialog's position option will make Pmcomm restore the last position of the transfer dialog each time it is invoked. If this option is not selected then OS/2 will decide where to place the dialog boxes. ═══ 9.7.12. Show Dial Message Box ═══ The Show Dial Message Box option makes Pmcomm display a message box and beeps at the user, when Pmcomm obtains a remote connection, until the OK button is pressed. This will make sure you notice that Pmcomm has a remote connection. ═══ 9.7.13. Local Echo On ═══ The local echo on option will make Pmcomm echo all keystrokes to the local screen as well as to the remote computer. ═══ 9.7.14. Turn Sound On ═══ The turn sound on option will make Pmcomm alert the user when certain functions have been completed. The sound must also be turned on in OS/2 for this option to work. In the System Setup object in the OS/2 System folder there is an object labeled Sound. Make sure the Warning Beep box is checked. ═══ 9.8. Status Line ═══ This option will activate Pmcomm's Status Line. The Status Line shows the time connected to a remote computer and the terminal type. If the mouse cursor is moved over the top of a button on the button bar, the Status Line also shows a brief description of the button. If the mouse cursor is moved over the top of the port button, the current port statistics are displayed on the Status Line. The elapsed timer starts as soon as you are connected to another computer. The timer displays the elapsed time in hours and minutes. You may also set two warning levels. The first will change the connect time to yellow and the second level will turn the connect time red. These warning levels are useful to keep track of how of the time you are connected to a remote computer. ═══ 9.8.1. Show Status Line ═══ The "Show status line" option will display Pmcomm's Status Line at the bottom of the Pmcomm window. For more information see Status_Line. ═══ 9.8.2. Connect time for first warning ═══ After the amount of time specified in this option expires, Pmcomm will turn the connect time yellow. The time must be specified in the hh:mm format. ═══ 9.8.3. Connect time for second warning ═══ After the amount of time specified in this option expires, Pmcomm will turn the connect time red. The time must be specified in the hh:mm format. ═══ 9.9. File Open ═══ Pmcomm uses the standard OS/2 file open dialog, when the user needs to open an existing file. When multiple files can be opened (such as when doing batch uploads), Pmcomm allows the user to select multiple files. If a user types in a file name with wild cards, such as *.cmd, then all the files that end with a cmd extension will be displayed in the File list box. A user may also type in the file name directly, instead of selecting the file with the mouse. Different disk drives may be selected with the drive combo box, and different directories can be selected using the directory list box. Pmcomm will display either the Pmcomm working directory, or the script directory (if starting a script), or the upload directory (if uploading or importing a file). If a user uploads a file from other then the upload directory, the next time (as long as Pmcomm is not closed) the user uploads a file Pmcomm will display that directory. The same thing works when starting scripts. ═══ 9.10. Terminal ═══ Terminal allows you to select which emulation you wish to use. There are also some options for the different emulations. ═══ 9.10.1. TTY emulation ═══ The TTY emulation makes Pmcomm act as a teletype device. Generally this is the least used emulation, however, it is also the fastest. The reason for this is that there are very few special commands that Pmcomm has to process. None of the special ANSI control codes are processed. ═══ 9.10.2. ANSI emulation ═══ The ANSI emulation is probably the most used. It will execute the special ANSI screen control commands. This allows the remote program to be able to clear the screen, position the cursor and change the colors. There are other screen control commands but these are the most commonly used ones. There are also options to have Pmcomm ignore the ANSI color changes so that you can use the colors you want, instead of the ones the remote computer uses, and to send the ANSI cursor position commands with the arrow keys. When using the ANSI emulation you can also have Pmcomm strip off the ANSI commands before saving the information into a capture file. This will make the capture file much more readable. You can also change the length of the page, to correspond to the size of your screen. The default for the ANSI page length is 25 lines, and under most cases should be left there. ═══ 9.10.3. VT100 and VT220 emulation ═══ In VT100 and VT220 emulation, some keys have been changed to try to more closely emulate the VT100 keyboard. F1-F4 are now the PF keys. Because of this the F1 key will not display the normal help and F3 will not exit the program. The PF keys will send the following characters: F1 = ESCOP F2 = ESCOQ F3 = ESCOR F4 = ESCOS Where ESC is equal to the ASCII character hex 1B. All other hot keys will not be available. When the num lock key is off, the numerical key pad will be in the application mode. If you are connecting to a VT220 Host you can use these keys to send the VT220 PF key values. For example pressing the 1 on the numeric key pad will send the VT220 PF1 key. Pressing the 3 on the numeric key pad will send the VT220 PF3 key, and so on. With the num lock on the numbers will be sent. The plus key has been re-mapped to be a comma, again to be compatible with the VT100 keyboard. In most cases it is best to tell the host that you are a VT220 terminal. The VT100 emulation of Pmcomm supports most of the VT220 commands, and will allow you to use the extra support that VT220 allows. If you tell the host that you are a VT220 terminal, for example, you will be able to use the Ctrl-R for reset and the Ctrl-C for clear. These are just a couple of examples of the additional benefit that you can get from VT220. The send DEL for backspace option is the default for many VT100 keyboards. When this is selected, Pmcomm will send a hex 7f character instead of the backspace character. You can still send a backspace character by pressing Ctrl-Backspace. This allows you to have both these characters available at one time. The translate CR/LF for LF option will act as if it received a carriage return and a line feed, each time it receives a line feed. The line wrap option will make Pmcomm wrap the line if the line is longer than the page width. If this option is off the line will be truncated. The Insert mode option will allow you to insert characters into the middle of a line and the rest of the line will be shifted to the right to allow room for the new characters. The cursor visible option determines if the cursor will be shown on the screen or not. The Screen origin relative option determines if Pmcomm will keep everything on a 25 line screen or allow it to use the scroll back buffer. In most cases this option should be selected. The last two options are to set the width of the screen. Either 80 or 132 columns are supported. Most of these options can be changed from the host. The default setup should work for most applications, and the host can change the options to meet different needs. ═══ 9.11. Chat ═══ This sets up Pmcomm to "chat" when connected to another computer that is also running Pmcomm. This mode automatically sets Pmcomm to echo characters locally and to send a carriage return line feed combination when the enter key is pressed. ═══ 10. Macros ═══ Allows you to pick, with a mouse, the macro you wish to send. Can also be selected with an Alt+corresponding number keystroke. Pmcomm allows you to set up ten different macros. Scripts can be executed from macros by using the shell command. An example of this would be: shell("c:\pmcomm\plane.cmd"); This would execute the REXX script called plane.cmd. This allows you a quick and easy way to execute your most popular scripts. ═══ 11. Script Syntax ═══ Both, internal and REXX, syntaxes are described in this section. ═══ 11.1. REXX Functions ═══ This describes the function calls that are available in the rxpmcomm.dll. Before using any of these calls you must include these lines in your REXX program: Call RxFuncadd " init_dll ","RxPmcomm","init_dll" Parse arg port portname screen_handle dde_output dde_input semaphore Call init_dll The rxpmcomm.dll must reside in a directory listed in your LIBPATH statement in config.sys. One of the default directories is \os2\dll. If you are using OS/2 2.0 or later, then you can use the init_32dll, which is in the RxPmc32.dll. This is a 32 bit dll, which will use less memory and maybe faster in some cases. These functions are designed to make it easier to preform tasks necessary when writing scripts for asynch communications. To invoke a REXX program from a script, use the shell( ) function in the script. The format of the shell function is as follows: shell("\path\filename.cmd"); where filename.cmd is your REXX program. These functions have been tested with the REXX that comes with OS/2 1.3 and 2.0, but should work with any totally function compatible REXX. There are some sample REXX programs included. ═══ 11.1.1. init_dll ═══ The init_dll function will register the functions in the rxpmcomm.dll, with REXX. This function must be called before any other rxpmcomm.dll function is called. The RxFuncadd must be called before init_dll to register this function with REXX. ═══ 11.1.2. init_32dll ═══ The init_32dll function will register the functions in the rxpmc32.dll, with REXX. This function must be called before any other rxpmc32.dll function is called. The RxFuncadd must be called before init_32dll to register this function with REXX. The rxpmc32.dll and the init_32dll function can only be used with OS/2 2.0 and later. ═══ 11.1.3. os2_shell ═══ os2_shell port,port Example Call os2_shell port,port Description This command will allow a caller to shell to OS/2, remotely. The first parameter is the input handle and the second is the output handle. In the example above, the command will receive and send the information to the communication port. Returns 1 if successful and 0 if unsuccessful. ═══ 11.1.4. set_download_path ═══ set_download_path directory,dde_output Example Call set_download_path "c:\pmcomm",dde_output Description The above example will set the download path to c:\pmcomm. This will store all of the files received in that directory. The dde_output, is the dde_output value passed on the command line. Returns 1 if successful and 0 if unsuccessful. ═══ 11.1.5. setcom ═══ setcom baud,parity,data_bit,stop_bits,port Example Call setcom "2400","N","8","1",port Description This would set the communication port to 2400 baud, no parity, 8 data bits, 1 stop bit. Baud can be from 300 to 19200 with the standard OS/2 device driver. Parity can be N(none), O(odd), E(even), M(marked), or S(spaced). Data bits can be 5, 6, 7 or 8. Stop bits can be 1 or 2 (2 can only be used with 5 data bits). If a parameter is an empty string (i.e. setcom "","E","7","1",port) this leaves the baud at the current rate but set the line characteristics to 7, Even, 1. Returns 1 if successful and 0 if unsuccessful. ═══ 11.1.6. sendb ═══ sendb length,port Example Call sendb "300",port Description This call sends a break signal a certain time in milliseconds. The above example would send a break signal for 300 milliseconds. This call is mostly used to establish direct connects (not using a modem). Three hundred milliseconds should be okay for most situations. Returns 1 if successful and 0 if unsuccessful. ═══ 11.1.7. dcd ═══ dcd port Example Call dcd port Description This call checks to see if there is a carrier detected on the modem. You can use this to see if Pmcomm is still online to a remote computer. For this information to be correct the modem must support dcd and the modem must be configured to support dcd. To find the command refer to your owner's manual. Returns 1 if carrier detected and 0 if no carrier. ═══ 11.1.8. char_avail ═══ char_avail port Example Call char_avail port Description This call checks to see how many characters are available in the device driver's receive buffer. You can use this function to check to see if the device driver has received any characters from the communication port. Returns Number of characters in device driver receive queue. ═══ 11.1.9. read_timeout ═══ read_timeout timeout,port Example Call read_timeout 20000,port Description This call sets the length of time (in milliseconds) that wait_for, wait_fore, Get_ch will wait for a character from the communication port. The above example will make the functions wait for 20 seconds. Returns 1 if successful and 0 if unsuccessful. ═══ 11.1.10. Get_ch ═══ Get_ch port Example Call Get_ch port Description This call will get a character from the communication port. If no character is available by the time set with read_timeout the function will return with a value of -1. Otherwise the function will return with the character read. Returns char value if successful and -1 if unsuccessful. ═══ 11.1.11. ring_detect ═══ ring_detect port Example Call ring_detect port Description This call can be used to inform a program if the phone is ringing. Returns 1 if ring detected, 0 if no ring, and 2 if invalid number of parameters. ═══ 11.1.12. drop_dtr ═══ drop_dtr port Example Call drop_dtr port Description This call is usually used to make a modem hang up. The modem must be configured to allow this. To find the command for your modem, check your owner's manual. Dtr needs to be dropped for about 2-3 seconds to make sure the modem sees the drop in DTR. After that length of time raise_dtr can be called to bring DTR back up. On a Hayes 2400 the above command will also keep the modem from doing an auto answer until you raise_dtr again. Returns 1 if successful and 0 if unsuccessful. ═══ 11.1.13. raise_dtr ═══ raise_dtr port Example Call raise_dtr port Description This call is usually used after drop_dtr to allow the modem to process commands and enable it to answer the phone. Returns 1 if successful and 0 if unsuccessful. ═══ 11.1.14. Wait_for (REXX) ═══ Wait_for string,string,string...,port Example Call Wait_for "first name?","last name?",port Description The above example would wait for either first name?, or last name?, from the communication port. The function will return the index of the string that matched. For example if the Wait_for received last name?, then the result would be 2. You can specify any number of strings depending on memory available. Returns Index of matched string or zero if timeout or error. ═══ 11.1.15. Wait_fore ═══ Wait_fore string,string,string...,port,screen_handle Example Call Wait_fore "first name?","last name?",port,screen_handle Call Wait_fore "first name?",port,1 Call Wait_fore "first name?","raw",port,1 Description The first example would wait for either first name?, or last name?, from the communication port and echo the out_put to the Pmcomm screen. The second example would do the same except it would write the out put to StdOut(value 1) which would be the REXX screen. The third example would look for an exact match coming across the communication port, including any ANSI sequences. Returns Index of matched string or zero if timeout or error. ═══ 11.1.16. Put_s ═══ Put_s string,port Example Call Put_s "first name",port Description This call will send string out to port. In the above example first name will be sent to the communication port. If port is not specified then 'string' will be sent to the REXX screen. If screen_handle is specified instead of port then the string will be sent to the Pmcomm screen. Returns Length of string actually written. ═══ 11.1.17. Sleep (REXX) ═══ Sleep time Example Call Sleep "1000" Description This call will delay the program for the amount of milliseconds specified. The above example will delay the computer for one second. Returns Unconditionally 0. ═══ 11.1.18. beep ═══ beep frequency,duration Example Call beep 495,100 Description The above example will beep the speaker. Returns 1 if successful and 0 if unsuccessful. ═══ 11.1.19. get_cursor_position ═══ get_cursor_position axis,dde_output,dde_input Example Call get_cursor_position "column",dde_output,dde_input Description The above will return the column that the cursor is in. To get the current row, you would issue this call with "row" instead of "column". The row value that is returned is relative to the top of the scroll back buffer. The top row of the scroll back buffer and the first column would be 0,0. Returns Cursor position. ═══ 11.1.20. get_char_at ═══ get_char_at row,column,number,dde_output,dde_input Example Call get_char_at 0,0,80,dde_output,dde_input Description The above will return the characters at the first line of the scroll back buffer. It will return 80 characters, even if the characters are spaces. The maximum number of characters that can be returned at one time is 200. Returns Character(s) at the specified row and column. ═══ 11.1.21. REXX capture_on ═══ capture_on filename,dde_output,dde_input Example Call capture_on "c:\pmcomm\cap.txt", dde_output, dde_input Description The above will turn capture on so that everything will be saved into a file. If you have strip ANSI configured in Pmcomm then the text only will be saved in ANSI, VT100, and VT220 terminal emulations. If the file already exists it will be overwritten. Returns 1 if successful and 0 if not. ═══ 11.1.22. REXX capture_off ═══ capture_off dde_output,dde_input Example Call capture_off dde_output,dde_input Description The above will turn capture off. The capture may have been started from a script or from the menu. Returns 1 if successful and 0 if not. ═══ 11.1.23. REXX change_option ═══ change_option "option",dde_output,dde_input This command will allow a script to change certain options in Pmcomm. The options that can be changed are: device. This option will allow you to change the current device that Pmcomm is using. For example to change the current device to COM2, the syntax would be: Call change_option "device=COM2",dde_output,dde_input hardware. This option will allow you to turn hardware flow control on or off. If you want to turn hardware flow control off the syntax would be: Call change_option "hardware=OFF",dde_output,dde_input To turn hardware flow control on you would replace the OFF with ON. XON/XOFF. This option will allow you to turn Xon/Xoff flow control on or off. If you want to turn Xon/Xoff flow control off the syntax would be: Call change_option "XON/XOFF=OFF",dde_output,dde_input To turn Xon/Xoff flow control on you would replace the OFF with ON. dtr. If this option is turned on the DTR will be lowered when hangup is selected. If you want to turn this option off the syntax would be: Call change_option "dtr=OFF",dde_output,dde_input stop bits. This option will allow you to set the number of stop bits that the communication port is set to. The communication port will be changed before the command is completed, and the default stop bits will be set to the new value. To set the communication port to 1 stop bit, the syntax would be: Call change_option "stop bits=1",dde_output,dde_input The communication port can only be set to 1 or 2 stop bits from a script. data bits. This option will allow you to set the number of data bits that the communication port is set to. The communication port will be changed before the command is completed, and the default data bits will be set to the new value. To set the communication port to 8 data bits, the syntax would be: Call change_option "data bits=8",dde_output,dde_input The communication port can be set to 8, 7, 6 or 5 data bits. parity. This option will allow you to set the parity for the current communication port. The communication port will be changed before the command is completed, and the default parity will be set to the new value. To set the communication port to Even parity, the syntax would be: Call change_option "parity=Even",dde_output,dde_input The communication port can be set to None, Even , Odd, Mark or Space parity. initialization string. This option allows you to change the modem initialization string that Pmcomm uses. To change the string the syntax would be: Call change_option "initialization string=ATZ",dde_output,dde_input dial timeout. This option will allow you to set the number of seconds that Pmcomm will wait when dialing a remote computer. If you wanted to set the number of seconds to 60 the syntax for the command would be: Call change_option "dial timeout=60",dde_output,dde_input redial delay. This option will allow you to set the number of seconds that Pmcomm will wait between dialing attempts. If you wanted to set the number of seconds to 6 the syntax for the command would be: Call change_option "redial delay=6",dde_output,dde_input hangup string. This option allows you to change the modem hangup string that Pmcomm uses. To change the string the syntax would be: Call change_option "hangup string=+++~~~ATH^M",dde_output,dde_input auto zmodem string. Some host systems do not send a standard auto zmodem string. This command allows you to change the string that Pmcomm looks for, when the host starts a zmodem send file transfer. When Pmcomm finds a match it will start a zmodem receive file transfer. To change the auto zmodem string the syntax would be: Call change_option "auto zmodem string=B00000",dde_output,dde_input zmodem date. This option allows you turn on and off whether Pmcomm will compare the file dates during a zmodem resume file transfer. The syntax to turn the date compare off would be: Call change_option "zmodem date=OFF",dde_output,dde_input To turn this option on you would replace the OFF with ON. zmodem rename. This option allows you turn on and off whether Pmcomm will rename duplicate files, if a resume fails (or is turned off). If this option is on Pmcomm will rename the new file with a number for an extension. The syntax to turn the zmodem rename off would be: Call change_option "zmodem rename=OFF",dde_output,dde_input To turn this option on you would replace the OFF with ON. auto zmodem. This option will allow you to turn the auto zmodem feature on or off. If you want to turn auto zmodem off the syntax would be: Call change_option "auto zmodem=OFF",dde_output,dde_input To turn auto zmodem on you would replace the OFF with ON. zmodem recovery. This option will allow you to turn the zmodem recovery feature on or off. If you want to turn zmodem recovery off the syntax would be: Call change_option "zmodem recovery=OFF",dde_output,dde_input To turn zmodem recovery on you would replace the OFF with ON. zmodem crc. This option allows you to select either the 32 bit or 16 bit zmodem CRC error detection option. To select the 32 bit option the syntax would be: Call change_option "zmodem crc=32",dde_output,dde_input download directory. To change the current download directory the syntax would be: Call change_option "download directory=c:\pmcomm\",dde_output,dde_input hide dial. This option allows you to select if the main terminal window is hidden while Pmcomm is dialing a remote computer. To allow the main window to remain visible while dialing the syntax would be: Call change_option "hide dial=OFF",dde_output,dde_input To turn hide dial on you would replace the OFF with ON. hide transfer. This option allows you to select if the main terminal window is hidden while Pmcomm is doing a file transfer. To allow the main window to remain visible while doing file transfers the syntax would be: Call change_option "hide transfer=OFF",dde_output,dde_input To turn hide transfer on you would replace the OFF with ON. auto vertical. This option determines if Pmcomm will automatically scroll the terminal window vertically to keep the current cursor position in the window. To turn this option off the syntax would be: Call change_option "auto vertical=OFF",dde_output,dde_input To turn this option on you would replace the OFF with ON. auto horizontal. This option determines if Pmcomm will automatically scroll the terminal window horizontally to keep the current cursor position in the window. To turn this option off the syntax would be: Call change_option "auto horizontal=OFF",dde_output,dde_input To turn this option on you would replace the OFF with ON. save dial. If this option is on then Pmcomm will store the position of the dialing dialog box, and use it the next time a number is dialed. To turn this option off the syntax would be: Call change_option("save dial=OFF",dde_output,dde_input To turn this option on you would replace the OFF with ON. save transfer. If this option is on then Pmcomm will store the position of the transfer dialog box, and use it the next time a file is transferred dialed. To turn this option off the syntax would be: Call change_option "save transfer=OFF",dde_output,dde_input To turn this option on you would replace the OFF with ON. sound. This option allows you to turn the warning beeps in Pmcomm, on or off. To turn this option off the syntax would be: Call change_option "sound=OFF",dde_output,dde_input To turn this option on you would replace the OFF with ON. monitor dcd. If this option is on, then Pmcomm will monitor the presence of data carrier detect (DCD). To turn this option off the syntax would be: Call change_option "monitor dcd=OFF",dde_output,dde_input To turn this option on you would replace the OFF with ON. page length. This option allows you to set the ANSI page length from a script. Following is an example of how to set the page length to 25 lines. Call change_option "page length=25",dde_output,dde_input terminal. This option allows you to change the type of terminal from within a Pmcomm script. The following example would set the terminal type to ANSI. Call change_option "terminal=ANSI",dde_output,dde_input The available valid terminal types are TTY, ANSI, VT100 or VT220. foreground. This option allows you to change the foreground color from within a Pmcomm script. The available colors are: black blue green cyan red magenta brown white dark grey light blue light green light cyan light red pink yellow bright white The syntax to change the foreground color to cyan would be: Call change_option "foreground=cyan",dde_output,dde_input background. This option allows you to change the background color from within a Pmcomm script. The available colors are: black blue green cyan red magenta brown white dark grey light blue light green light cyan light red pink yellow bright white The syntax to change the background color to black would be: Call change_option "background=black",dde_output,dde_input echo. This option allows you turn on and off the local keystroke echo. The syntax to turn echo off would be: Call change_option "echo=OFF",dde_output,dde_input To turn this option on you would replace the OFF with ON. prefix1 prefix2 prefix3 These options allow you to change the dialing prefixes. For example to change prefix1 you would use the following syntax: Call change_option "prefix1=ATDT",dde_output,dde_input suffix1 suffix2 suffix3 These options allow you to change the dialing suffixes. For example to change suffix1 you would use the following syntax: Call change_option "suffix1=^M",dde_output,dde_input strip ansi. This option allows you to select if Pmcomm will strip the ANSI commands from a capture file. The syntax to turn off the stripping of the ANSI commands would be: Call change_option "strip ansi=OFF",dde_output,dde_input To turn this option on you would replace the OFF with ON. macro1 macro2 macro3 macro4 macro5 macro6 macro7 macro8 macro9 macro10 These options allow you to change the keyboard macros. For example to change macro1 you would use the following syntax: Call change_option "macro1=ATZ",dde_output,dde_input phone directory. phone directory. To change the current phone directory the syntax would be: Call change_option "phone directory=c:\pmcomm\pmcomm.fon",dde_output,dde_input This would change the file used as the Pmcomm phone file. script directory. To change the current script directory the syntax would be: Call change_option "script directory=c:\pmcomm\script",dde_output,dde_input capture directory. To change the current capture file directory the syntax would be: Call change_option "capture directory=c:\pmcomm\capture",dde_output,dde_input chat. This option allows you to turn the Pmcomm chat mode on or off. The syntax to turn off chat mode is: Call change_option "chat=OFF",dde_output,dde_input To turn this option on you would replace the OFF with ON. auto cisb. This option allows you to turn the automatic CISB file transfer on or off. The syntax to turn off auto CISB is: Call change_option "auto cisb=OFF",dde_output,dde_input To turn this option on you would replace the OFF with ON. cisb recovery. This option allows you to turn the CISB file recovery on or off. The syntax to turn off the CISB file recovery is: Call change_option "cisb recovery=OFF",dde_output,dde_input To turn this option on you would replace the OFF with ON. baud. This option allows you to change the current baud rate. This will also change the default baud rate saved in the setup file. The syntax for this command is: Call change_option "baud=19200",dde_output,dde_input startup script. Use this command to change the name of the script that will be executed upon startup of Pmcomm. The syntax of this command is: change_option("startup script=c:\pmcomm\startup.scr"); exit on hangup. This command allows you to have Pmcomm exit once data carrier detect (DCD) has dropped. This will only work correctly if Monitor DCD is also selected. The syntax for this command is: Call change_option "exit on hangup=ON",dde_output,dde_input working directory. To change the current working directory the syntax would be: Call change_option "working directory=c:\pmcomm",dde_output,dde_input scroll size. This command allows you to change the size of the Extended Scroll Back buffer. To change the scroll size the syntax would be: Call change_option "scroll size=65535",dde_output,dde_input ═══ 11.1.24. REXX dial ═══ dial "name",dde_output,dde_input This command will allow a script to dial a number listed in the current Pmcomm dialing directory. To dial the entry call Compu-Plane you would use the following syntax: Call dial "Compu-Plane",dde_output,dde_input This command returns the baud rate of the connection or a 0 if there was no connection. One way that a zero could be returned is if the cancel button on the dialing dialog was pushed. If the REXX dial command returns a 0 you can use the REXX exit function to cancel the script. ═══ 11.1.25. REXX get_dial_memo ═══ get_dial_memo dde_output,dde_input This command will retrieve the information stored in the memo field of the currently connected phone number. This will allow you to, for example, store your password in the dialing directory memo field, and write a script to use it. By doing this you can change your password without editing the script. All you would have to do is change the text in the memo field for that number. To retrieve the text stored in the current memo field the syntax would be: Call get_dial_memo dde_output,dde_input ═══ 11.1.26. REXX clipboard_paste ═══ clipboard_paste dde_output,dde_input This command will retrieve text stored in the OS/2 clipboard. The maximum amount of text that can be retrieved at one time is 8192 bytes. To retrieve the text stored in the clipboard the syntax would be: Call clipboard_paste dde_output,dde_input ═══ 11.1.27. REXX clipboard_copy ═══ clipboard_copy dde_output,dde_input This command will copy text to the OS/2 clipboard. The maximum amount of text that can be sent at one time is 8192 bytes. To send text to the clipboard the syntax would be: Call clipboard_copy "This is a test", dde_output,dde_input ═══ 11.1.28. REXX clipboard_append ═══ clipboard_append dde_output,dde_input This command will append text to the existing text in the OS/2 clipboard. The maximum amount of text that can be sent at one time is 8192 bytes. To append text to the clipboard the syntax would be: Call clipboard_append "This is a test", dde_output,dde_input ═══ 11.1.29. xmodem_send ═══ xmodem_send filename,dde_output,dde_input Example Call xmodem_send "filename.ext",dde_output,dde_input Description This call will invoke the Xmodem_CRC send routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer dialog that it does when uploading from the menu. Returns 1 if call is successful and 0 if unsuccessful. ═══ 11.1.30. xmodem_receive ═══ xmodem_receive filename,dde_output,dde_input Example Call xmodem_receive "filename.ext",dde_output,dde_input Description This call will invoke the Xmodem_CRC receive routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer dialog that it does when downloading from the menu. The file will be downloaded into the download directory. The file name specified must not include a path. Returns 1 if call is successful and 0 if unsuccessful. ═══ 11.1.31. xmodem_chk_send ═══ xmodem_chk_send filename,dde_output,dde_input Example Call xmodem_chk_send "filename.ext",dde_output,dde_input Description This call will invoke the Xmodem_Checksum send routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer dialog that it does when uploading from the menu. Returns 1 if call is successful and 0 if unsuccessful. ═══ 11.1.32. xmodem_chk_receive ═══ xmodem_chk_receive filename,dde_output,dde_input Example Call xmodem_receive "filename.ext",dde_output,dde_input Description This call will invoke the Xmodem_Checksum receive routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer dialog that it does when downloading from the menu. The file will be downloaded into the download directory. The file name specified must not include a path. Returns 1 if call is successful and 0 if unsuccessful. ═══ 11.1.33. xmodem_1k_send ═══ xmodem_1k_send filename,dde_output,dde_input Example Call xmodem_1k_send "filename.ext",dde_output,dde_input Description This call will invoke the 1K-Xmodem send routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer dialog that it does when uploading from the menu. Returns 1 if call is successful and 0 if unsuccessful. ═══ 11.1.34. xmodem_1k_receive ═══ xmodem_1k_receive filename,dde_output,dde_input Example Call xmodem_1k_receive "filename.ext",dde_output,dde_input Description This call will invoke the 1K-Xmodem receive routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer dialog that it does when downloading from the menu. The file will be downloaded into the download directory. The file name specified must not include a path. Returns 1 if call is successful and 0 if unsuccessful. ═══ 11.1.35. ymodem_send ═══ ymodem_send filename,dde_output,dde_input Example Call ymodem_send "filename.ext",dde_output,dde_input Description This call will invoke the Ymodem send routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer dialog that it does when uploading from the menu. You may send multiple files by specifying more than file name. Returns Number of files transferred. ═══ 11.1.36. ymodem_receive ═══ ymodem_receive dde_output,dde_input Example Call ymodem_receive dde_output,dde_input Description This call will invoke the Ymodem receive routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer dialog that it does when downloading from the menu. The file will be downloaded into the download directory. This one call will receive multiple files. The filenames used are the ones sent from the remote computer. Returns Number of files transferred. ═══ 11.1.37. ymodemg_send ═══ ymodemg_send filename,dde_output,dde_input Example Call ymodemg_send "filename.ext",dde_output,dde_input Description This call will invoke the Ymodem-g send routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer dialog that it does when uploading from the menu. You may send multiple files by specifying more than file name. Returns Number of files transferred. ═══ 11.1.38. ymodemg_receive ═══ ymodemg_receive dde_output,dde_input Example Call ymodemg_receive dde_output,dde_input Description This call will invoke the Ymodem-g receive routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer dialog that it does when downloading from the menu. The file will be downloaded into the download directory. This one call will receive multiple files. The filenames used are the ones sent from the remote computer. Returns Number of files transferred. ═══ 11.1.39. zmodem_send ═══ zmodem_send filename,dde_output,dde_input Example Call zmodem_send "filename.ext",dde_output,dde_input Description This call will invoke the Zmodem send routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer dialog that it does when uploading from the menu. You may send multiple files by specifying more than file name. Returns Number of files transferred. ═══ 11.1.40. zmodem_receive ═══ zmodem_receive dde_output,dde_input Example Call zmodem_receive dde_output,dde_input Description This call will invoke the Zmodem receive routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer dialog that it does when downloading from the menu. The file will be downloaded into the download directory. This one call will receive multiple files. The filenames used are the ones sent from the remote computer. Returns Number of files transferred. ═══ 11.1.41. kermit_send ═══ kermit_send filename,dde_output,dde_input Example Call kermit_send "filename.ext",dde_output,dde_input Description This call will invoke the Kermit send routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer dialog that it does when uploading from the menu. You may send multiple files by specifying more than file name. Returns Number of files transferred. ═══ 11.1.42. kermit_receive ═══ kermit_receive dde_output,dde_input Example Call kermit_receive dde_output,dde_input Description This call will invoke the Kermit receive routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer dialog that it does when downloading from the menu. The file will be downloaded into the download directory. This one call will receive multiple files. The filenames used are the ones sent from the remote computer. Returns Number of files transferred. ═══ 11.1.43. ascii_send ═══ ascii_send filename,dde_output,dde_input Example Call ascii_send "filename.ext",dde_output,dde_input Description This call will invoke the ASCII send routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer dialog that it does when uploading from the menu. Returns 1 if call is successful and 0 if unsuccessful. ═══ 11.1.44. ascii_receive ═══ ascii_receive filename,dde_output,dde_input Example Call ascii_receive "filename.ext",dde_output,dde_input Description This call will invoke the ASCII receive routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer dialog that it does when downloading from the menu. The file will be downloaded into the download directory. The file name specified must not include a path. Returns 1 if call is successful and 0 if unsuccessful. ═══ 11.1.45. cisb_send ═══ cisb_send filename,dde_output,dde_input Example Call cisb_send "filename.ext",dde_output,dde_input Description This call will invoke the CISB send routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer dialog that it does when uploading from the menu. Returns 1 if call is successful and 0 if unsuccessful. ═══ 11.1.46. cisb_receive ═══ cisb_receive filename,dde_output,dde_input Example Call cisb_receive "filename.ext",dde_output,dde_input Description This call will invoke the CISB receive routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer dialog that it does when downloading from the menu. The file will be downloaded into the download directory. The file name specified must not include a path. Returns 1 if call is successful and 0 if unsuccessful. ═══ 11.2. Internal Functions ═══ These are script functions that are built into Pmcomm. ═══ 11.2.1. wait_for (internal) ═══ wait_for("string"); This will wait until the word 'string' is received. One use of this is when logging onto a BBS you can have it wait until prompted for a first name. ═══ 11.2.2. puts ═══ puts("string"); This will send string to the communication port. The 'C' language special character '\r','\n','\b',and '\a' can also be used. The \r means carriage return. The \n means carriage return and line feed combination. The \b means backspace. The \a means alert (Pmcomm will beep). ═══ 11.2.3. sleep (internal) ═══ sleep(1000); This will wait for the number of milliseconds specified. In this example it would sleep for one second. ═══ 11.2.4. call ═══ call("filename"); This allows you to nest scripts. If you put the name of the script that you want to execute where it says filename, it will execute that script and then continue. The limit on number of nested scripts is only by available stack space. ═══ 11.2.5. capture_on ═══ capture_on("filename"); Captures all screen output to a file. Replace filename with the name of the file you want the output written to. The capture file will be automatically closed when you log off, if you have Monitor_DCD selected. ═══ 11.2.6. capture_off ═══ capture_off(); Stops screen capture and closes the capture file. You can also close the capture file from the menu. ═══ 11.2.7. change_option ═══ change_option("option"); This command will allow a script to change certain options in Pmcomm. The options that can be changed are: device. This option will allow you to change the current device that Pmcomm is using. For example to change the current device to COM2, the syntax would be: change_option("device=COM2"); hardware. This option will allow you to turn hardware flow control on or off. If you want to turn hardware flow control off the syntax would be: change_option("hardware=OFF"); To turn hardware flow control on you would replace the OFF with ON. XON/XOFF. This option will allow you to turn Xon/Xoff flow control on or off. If you want to turn Xon/Xoff flow control off the syntax would be: change_option("XON/XOFF=OFF"); To turn Xon/Xoff flow control on you would replace the OFF with ON. dtr. If this option is turned on the DTR will be lowered when hangup is selected. If you want to turn this option off the syntax would be: change_option("dtr=OFF"); stop bits. This option will allow you to set the number of stop bits that the communication port is set to. The communication port will be changed before the command is completed, and the default stop bits will be set to the new value. To set the communication port to 1 stop bit, the syntax would be: change_option("stop bits=1"); The communication port can only be set to 1 or 2 stop bits from a script. data bits. This option will allow you to set the number of data bits that the communication port is set to. The communication port will be changed before the command is completed, and the default data bits will be set to the new value. To set the communication port to 8 data bits, the syntax would be: change_option("data bits=8"); The communication port can be set to 8, 7, 6 or 5 data bits. parity. This option will allow you to set the parity for the current communication port. The communication port will be changed before the command is completed, and the default parity will be set to the new value. To set the communication port to Even parity, the syntax would be: change_option("parity=Even"); The communication port can be set to None, Even , Odd, Mark or Space parity. initialization string. This option allows you to change the modem initialization string that Pmcomm uses. To change the string the syntax would be: change_option("initialization string=ATZ"); dial timeout. This option will allow you to set the number of seconds that Pmcomm will wait when dialing a remote computer. If you wanted to set the number of seconds to 60 the syntax for the command would be: change_option("dial timeout=60"); redial delay. This option will allow you to set the number of seconds that Pmcomm will wait between dialing attempts. If you wanted to set the number of seconds to 6 the syntax for the command would be: change_option("redial delay=6"); hangup string. This option allows you to change the modem hangup string that Pmcomm uses. To change the string the syntax would be: change_option("hangup string=+++~~~ATH^M"); auto zmodem string. Some host systems do not send a standard auto zmodem string. This command allows you to change the string that Pmcomm looks for, when the host starts a zmodem send file transfer. When Pmcomm finds a match it will start a zmodem receive file transfer. To change the auto zmodem string the syntax would be: change_option("auto zmodem string=B00000"); zmodem date. This option allows you turn on and off whether Pmcomm will compare the file dates during a zmodem resume file transfer. The syntax to turn the date compare off would be: change_option("zmodem date=OFF"); To turn this option on you would replace the OFF with ON. zmodem rename. This option allows you turn on and off whether Pmcomm will rename duplicate files, if a resume fails (or is turned off). If this option is on Pmcomm will rename the new file with a number for an extension. The syntax to turn the zmodem rename off would be: change_option("zmodem rename=OFF"); To turn this option on you would replace the OFF with ON. auto zmodem. This option will allow you to turn the auto zmodem feature on or off. If you want to turn auto zmodem off the syntax would be: change_option("auto zmodem=OFF"); To turn auto zmodem on you would replace the OFF with ON. zmodem recovery. This option will allow you to turn the zmodem recovery feature on or off. If you want to turn zmodem recovery off the syntax would be: change_option("zmodem recovery=OFF"); To turn zmodem recovery on you would replace the OFF with ON. zmodem crc. This option allows you to select either the 32 bit or 16 bit zmodem CRC error detection option. To select the 32 bit option the syntax would be: change_option("zmodem crc=32"); download directory. To change the current download directory the syntax would be: change_option("download directory=c:\pmcomm\"); hide dial. This option allows you to select if the main terminal window is hidden while Pmcomm is dialing a remote computer. To allow the main window to remain visible while dialing the syntax would be: change_option("hide dial=OFF"); To turn hide dial on you would replace the OFF with ON. hide transfer. This option allows you to select if the main terminal window is hidden while Pmcomm is doing a file transfer. To allow the main window to remain visible while doing file transfers the syntax would be: change_option("hide transfer=OFF"); To turn hide transfer on you would replace the OFF with ON. auto vertical. This option determines if Pmcomm will automatically scroll the terminal window vertically to keep the current cursor position in the window. To turn this option off the syntax would be: change_option("auto vertical=OFF"); To turn this option on you would replace the OFF with ON. auto horizontal. This option determines if Pmcomm will automatically scroll the terminal window horizontally to keep the current cursor position in the window. To turn this option off the syntax would be: change_option("auto horizontal=OFF"); To turn this option on you would replace the OFF with ON. save dial. If this option is on then Pmcomm will store the position of the dialing dialog box, and use it the next time a number is dialed. To turn this option off the syntax would be: change_option("save dial=OFF"); To turn this option on you would replace the OFF with ON. save transfer. If this option is on then Pmcomm will store the position of the transfer dialog box, and use it the next time a file is transferred dialed. To turn this option off the syntax would be: change_option("save transfer=OFF"); To turn this option on you would replace the OFF with ON. sound. This option allows you to turn the warning beeps in Pmcomm, on or off. To turn this option off the syntax would be: change_option("sound=OFF"); To turn this option on you would replace the OFF with ON. monitor dcd. If this option is on, then Pmcomm will monitor the presence of data carrier detect (DCD). To turn this option off the syntax would be: change_option("monitor dcd=OFF"); To turn this option on you would replace the OFF with ON. page length. This option allows you to set the ANSI page length from a script. Following is an example of how to set the page length to 25 lines. change_option("page length=25"); terminal. This option allows you to change the type of terminal from within a Pmcomm script. The following example would set the terminal type to ANSI. change_option("terminal=ANSI"); The available valid terminal types are TTY, ANSI, VT100 or VT220. foreground. This option allows you to change the foreground color from within a Pmcomm script. The available colors are: black blue green cyan red magenta brown white dark grey light blue light green light cyan light red pink yellow bright white The syntax to change the foreground color to cyan would be: change_option("foreground=cyan"); background. This option allows you to change the background color from within a Pmcomm script. The available colors are: black blue green cyan red magenta brown white dark grey light blue light green light cyan light red pink yellow bright white The syntax to change the background color to black would be: change_option("background=black"); echo. This option allows you turn on and off the local keystroke echo. The syntax to turn echo off would be: change_option("echo=OFF"); To turn this option on you would replace the OFF with ON. prefix1 prefix2 prefix3 These options allow you to change the dialing prefixes. For example to change prefix1 you would use the following syntax: change_option("prefix1=ATDT"); suffix1 suffix2 suffix3 These options allow you to change the dialing suffixes. For example to change suffix1 you would use the following syntax: change_option("suffix1=^M"); strip ansi. This option allows you to select if Pmcomm will strip the ANSI commands from a capture file. The syntax to turn off the stripping of the ANSI commands would be: change_option("strip ansi=OFF"); To turn this option on you would replace the OFF with ON. macro1 macro2 macro3 macro4 macro5 macro6 macro7 macro8 macro9 macro10 These options allow you to change the keyboard macros. For example to change macro1 you would use the following syntax: change_option("macro1=ATZ"); phone directory. To change the current phone directory the syntax would be: change_option("phone directory=c:\pmcomm\pmcomm.fon"); This would change the file used as the Pmcomm phone file. script directory. To change the current script directory the syntax would be: change_option("script directory=c:\pmcomm\script"); capture directory. To change the current capture file directory the syntax would be: change_option("capture directory=c:\pmcomm\capture"); chat. This option allows you to turn the Pmcomm chat mode on or off. The syntax to turn off chat mode is: change_option("chat=OFF"); To turn this option on you would replace the OFF with ON. auto cisb. This option allows you to turn the automatic CISB file transfer on or off. The syntax to turn off auto CISB is: change_option("auto cisb=OFF"); To turn this option on you would replace the OFF with ON. cisb recovery. This option allows you to turn the CISB file recovery on or off. The syntax to turn off the CISB file recovery is: change_option("cisb recovery=OFF"); To turn this option on you would replace the OFF with ON. baud. This option allows you to change the current baud rate. This will also change the default baud rate saved in the setup file. The syntax for this command is: change_option("baud=19200"); startup script. Use this command to change the name of the script that will be executed upon startup of Pmcomm. The syntax of this command is: change_option("startup script=c:\pmcomm\startup.scr"); exit on hangup. This command allows you to have Pmcomm exit once data carrier detect (DCD) has dropped. This will only work correctly if Monitor DCD is also selected. The syntax for this command is: change_option("exit on hangup=ON"); working directory. To change the current working directory the syntax would be: change_option("working directory=c:\pmcomm"); scroll size. This command allows you to change the size of the Extended Scroll Back buffer. To change the scroll size the syntax would be: change_option("scroll size=65535"); ═══ 11.2.8. Internal script dial ═══ dial("name"); This command will allow a script to dial a number listed in the current Pmcomm dialing directory. To dial the entry call Compu-Plane you would use the following syntax: dial("Compu-Plane"); ═══ 11.2.9. shell ═══ shell("\path\filename.ext"); Allows you to call an external program to run from a script. ═══ 11.2.10. exit (function) ═══ exit(); This function, once called, will exit Pmcomm. ═══ 11.3. 'C' Functions ═══ These are the functions that are included in the cpmcomm and cpmcom32 libraries. The cpmcomm.lib is a large model library and the cpmcom32.lib is a large model 32 bit library. The cpmcomm.h file has function definitions for the cpmcomm library and cpmcom32.h file has function definitions for the cpmcom32 library, and should be included in any program that uses the cpmcomm libraries. The 32 bit library is made to be used with the IBM C Set/2 compiler. The function init_lib must be called before any other of the library routines are used. ═══ 11.3.1. wait_for ═══ USHORT wait_for(USHORT argc,CHAR **argv,HFILE port); Example USHORT result; CHAR *argv[2]; CHAR string1[80]; CHAR string2[80]; strcpy(string1,"first name?"); strcpy(string2,"last name?"); argv[0] = string1; argv[1] = string2; result = wait_for(2,argv,port); Description The above example would wait for either first name?, or last name?, from the communication port. The function will return the index of the string that matched. For example if the wait_for received last name?, then the result would be 2. You can specify any number of strings depending on memory available. Returns Index of matched string or zero if timeout or error. ═══ 11.3.2. wait_fore ═══ USHORT wait_fore(USHORT argc,CHAR **argv,HFILE port, HFILE screen_handle); Example USHORT result; CHAR *argv[2]; CHAR string1[80]; CHAR string2[80]; strcpy(string1,"first name?"); strcpy(string2,"last name?"); argv[0] = string1; argv[1] = string2; result = wait_for(2,argv,port,screen_handle); Description The first example would wait for either first name?, or last name?, from the communication port and echo the out_put to the Pmcomm screen. Returns Index of matched string or zero if timeout or error. ═══ 11.3.3. put_s ═══ USHORT put_s(char *string,HFILE port); Example put_s("first name",port); Description This call will send string out to port. In the above example first name will be sent to the communication port. If screen_handle is specified instead of port then the string will be sent to the Pmcomm screen. Returns Length of string actually written. ═══ 11.3.4. sleep ═══ VOID sleep(ULONG time); Example sleep(1000L); Description This call will delay the program for the amount of milliseconds specified. The above example will delay the computer for one second. Returns None. ═══ 11.3.5. beep ═══ VOID beep(USHORT frequency,USHORT duration); Example beep(495,100); Description The above example will beep the speaker. Returns None. ═══ 11.3.6. os2_shell ═══ VOID os2_shell(HFILE port,HFILE port); Example os2_shell(port,port); Description This command will allow a caller to shell to OS/2, remotely. The first parameter is input handle and the second is the output handle. In the example above, the command will receive and send the information to the communication port. Returns None. ═══ 11.3.7. init_lib ═══ USHORT init_lib(int argc,char **argv); Example main(argc,argv) { init_lib(argc,argv); ... } The init_lib function will initialize some global variables that are passed on the command line. These variables are: USHORT port; CHAR portname[15]; HFILE dde_output,dde_input; HFILE screen_handle; This function must be called before any other library function is called. Returns 1 if sucessful and 0 if not. ═══ 11.3.8. 'C' set_download_path ═══ VOID set_download_path(char *path); Example set_download_path("c:\pmcomm"); Description The above example will set the download path to c:\pmcomm. This will store all of the files received in that directory. Returns None. ═══ 11.3.9. setcom ═══ SHORT setcom(char *baud,UCHAR parity,UCHAR data_bit,UCHAR stop_bits,HFILE port); Example setcom("2400",'N',8,1,port); Description This would set the communication port to 2400 baud, no parity, 8 data bits, 1 stop bit. Baud can be from 300 to 19200 with the standard OS/2 device driver. Parity can be N(none), O(odd), E(even), M(marked), or S(spaced). Data bits can be 5, 6, 7 or 8. Stop bits can be 1 or 2 (2 can only be used with 5 data bits). If the baud parameter is an empty string i.e. setcom("",'E',7,1,port) this leaves the baud at the current rate but set the line characteristics to 7, Even, 1. Returns 1 if successful and 0 if unsuccessful. ═══ 11.3.10. sendb ═══ VOID sendb(LONG length,HFILE port); Example sendb(300L,port); Description This call sends a break signal a certain time in milliseconds. The above example would send a break signal for 300 milliseconds. This call is mostly used to establish direct connects (not using a modem). Three hundred milliseconds should be okay for most situations. Returns None. ═══ 11.3.11. dcd ═══ USHORT dcd(HFILE port); Example dcd(port); Description This call checks to see if there is a carrier detected on the modem. You can use this to see if Pmcomm is still online to a remote computer. For this information to be correct the modem must support dcd and the modem must be configured to support dcd. To find the command refer to your owner's manual. Returns 1 if carrier detected and 0 if no carrier. ═══ 11.3.12. char_avail ═══ USHORT char_avail(HFILE port); Example char_avail(port); Description This call checks to see how many characters are available in the device drivers receive buffer. You can use this function to check to see if the device driver has received any characters from the communication port. Returns Number of characters in device driver receive queue. ═══ 11.3.13. read_timeout ═══ read_timeout(USHORT timeout,HFILE port); Example read_timeout(20000,port); Description This call sets the length of time (in milliseconds) that wait_for, wait_fore, get_ch will wait for a character from the communication port. The above example will make the functions wait for 20 seconds. Returns 1 if successful and 0 if unsuccessful. ═══ 11.3.14. get_ch ═══ CHAR get_ch(HFILE port); Example ch = get_ch(port); Description This call will get a character from the communication port. If no character is available by the time set with read_timeout the function will return with a value of -1. Otherwise the function will return with the character read. Returns char value if successful and -1 if unsuccessful. ═══ 11.3.15. ring_detect ═══ USHORT ring_detect(HFILE port); Example ring_detect(port); Description This call can be used to inform a program if the phone is ringing. Returns 1 if ring detected, 0 if no ring. ═══ 11.3.16. drop_dtr ═══ VOID drop_dtr(HFILE port); Example drop_dtr(port); Description This call is usually used to make a modem hang up. The modem must be configured to allow this. To find the command for your modem, check your owner's manual. Dtr needs to be dropped for about 2-3 seconds to make sure the modem sees the drop in DTR. After that length of time raise_dtr can be called to bring DTR back up. On a Hayes 2400 the above command will also keep the modem from doing an auto answer until you raise_dtr again. Returns None. ═══ 11.3.17. raise_dtr ═══ VOID raise_dtr(HFILE port); Example raise_dtr(port); Description This call is usually used after drop_dtr to allow the modem to process commands and enable it to answer the phone. Returns None. ═══ 11.3.18. get_cursor_position ═══ USHORT get_cursor_position(char *str); Example get_cursor_position("column"); Description The above will return the column that the cursor is in. To get the current row, you would issue this call with "row" instead of "column". The row value that is returned is relative to the top of the scroll back buffer. The top row of the scroll back buffer and the first column would be 0,0. Returns Cursor position. ═══ 11.3.19. get_char_at ═══ VOID get_char_at(USHORT row,USHORT col,USHORT num,char *returnstr); Example get_char_at(0,0,80,str); Description The above will return the characters at the first line (stored in str) of the scroll back buffer. It will return 80 characters, even if the characters are spaces. The maximum number of characters that can be returned at one time is 200. Returns None. ═══ 11.3.20. 'C'capture_on ═══ USHORT capture_on(filename); Example capture_on("c:\pmcomm\cap.txt"); Description The above will turn capture on so that everything will be saved into a file. If you have strip ANSI configured in Pmcomm then the text only will be saved in ANSI, VT100, and VT220 terminal emulations. Returns 1 if successful and 0 if not. ═══ 11.3.21. 'C' capture_off ═══ VOID capture_off(VOID); Example capture_off(); Description The above will turn capture off. The capture may have been started from a script or from the menu. Returns 1 if successful and 0 if not. ═══ 11.3.22. 'C' change_option ═══ change_option("option"); This command will allow a script to change certain options in Pmcomm. The options that can be changed are: device. This option will allow you to change the current device that Pmcomm is using. For example to change the current device to COM2, the syntax would be: change_option("device=COM2"); hardware. This option will allow you to turn hardware flow control on or off. If you want to turn hardware flow control off the syntax would be: change_option("hardware=OFF"); To turn hardware flow control on you would replace the OFF with ON. XON/XOFF. This option will allow you to turn Xon/Xoff flow control on or off. If you want to turn Xon/Xoff flow control off the syntax would be: change_option("XON/XOFF=OFF"); To turn Xon/Xoff flow control on you would replace the OFF with ON. dtr. If this option is turned on the DTR will be lowered when hangup is selected. If you want to turn this option off the syntax would be: change_option("dtr=OFF"); stop bits. This option will allow you to set the number of stop bits that the communication port is set to. The communication port will be changed before the command is completed, and the default stop bits will be set to the new value. To set the communication port to 1 stop bit, the syntax would be: change_option("stop bits=1"); The communication port can only be set to 1 or 2 stop bits from a script. data bits. This option will allow you to set the number of data bits that the communication port is set to. The communication port will be changed before the command is completed, and the default data bits will be set to the new value. To set the communication port to 8 data bits, the syntax would be: change_option("data bits=8"); The communication port can be set to 8, 7, 6 or 5 data bits. parity. This option will allow you to set the parity for the current communication port. The communication port will be changed before the command is completed, and the default parity will be set to the new value. To set the communication port to Even parity, the syntax would be: change_option("parity=Even"); The communication port can be set to None, Even , Odd, Mark or Space parity. initialization string. This option allows you to change the modem initialization string that Pmcomm uses. To change the string the syntax would be: change_option("initialization string=ATZ"); dial timeout. This option will allow you to set the number of seconds that Pmcomm will wait when dialing a remote computer. If you wanted to set the number of seconds to 60 the syntax for the command would be: change_option("dial timeout=60"); redial delay. This option will allow you to set the number of seconds that Pmcomm will wait between dialing attempts. If you wanted to set the number of seconds to 6 the syntax for the command would be: change_option("redial delay=6"); hangup string. This option allows you to change the modem hangup string that Pmcomm uses. To change the string the syntax would be: change_option("hangup string=+++~~~ATH^M"); auto zmodem string. Some host systems do not send a standard auto zmodem string. This command allows you to change the string that Pmcomm looks for, when the host starts a zmodem send file transfer. When Pmcomm finds a match it will start a zmodem receive file transfer. To change the auto zmodem string the syntax would be: change_option("auto zmodem string=B00000"); zmodem date. This option allows you turn on and off whether Pmcomm will compare the file dates during a zmodem resume file transfer. The syntax to turn the date compare off would be: change_option("zmodem date=OFF"); To turn this option on you would replace the OFF with ON. zmodem rename. This option allows you turn on and off whether Pmcomm will rename duplicate files, if a resume fails (or is turned off). If this option is on Pmcomm will rename the new file with a number for an extension. The syntax to turn the zmodem rename off would be: change_option("zmodem rename=OFF"); To turn this option on you would replace the OFF with ON. auto zmodem. This option will allow you to turn the auto zmodem feature on or off. If you want to turn auto zmodem off the syntax would be: change_option("auto zmodem=OFF"); To turn auto zmodem on you would replace the OFF with ON. zmodem recovery. This option will allow you to turn the zmodem recovery feature on or off. If you want to turn zmodem recovery off the syntax would be: change_option("zmodem recovery=OFF"); To turn zmodem recovery on you would replace the OFF with ON. zmodem crc. This option allows you to select either the 32 bit or 16 bit zmodem CRC error detection option. To select the 32 bit option the syntax would be: change_option("zmodem crc=32"); download directory. To change the current download directory the syntax would be: change_option("download directory=c:\pmcomm\"); hide dial. This option allows you to select if the main terminal window is hidden while Pmcomm is dialing a remote computer. To allow the main window to remain visible while dialing the syntax would be: change_option("hide dial=OFF"); To turn hide dial on you would replace the OFF with ON. hide transfer. This option allows you to select if the main terminal window is hidden while Pmcomm is doing a file transfer. To allow the main window to remain visible while doing file transfers the syntax would be: change_option("hide transfer=OFF"); To turn hide transfer on you would replace the OFF with ON. auto vertical. This option determines if Pmcomm will automatically scroll the terminal window vertically to keep the current cursor position in the window. To turn this option off the syntax would be: change_option("auto vertical=OFF"); To turn this option on you would replace the OFF with ON. auto horizontal. This option determines if Pmcomm will automatically scroll the terminal window horizontally to keep the current cursor position in the window. To turn this option off the syntax would be: change_option("auto horizontal=OFF"); To turn this option on you would replace the OFF with ON. save dial. If this option is on then Pmcomm will store the position of the dialing dialog box, and use it the next time a number is dialed. To turn this option off the syntax would be: change_option("save dial=OFF"); To turn this option on you would replace the OFF with ON. save transfer. If this option is on then Pmcomm will store the position of the transfer dialog box, and use it the next time a file is transferred dialed. To turn this option off the syntax would be: change_option("save transfer=OFF"); To turn this option on you would replace the OFF with ON. sound. This option allows you to turn the warning beeps in Pmcomm, on or off. To turn this option off the syntax would be: change_option("sound=OFF"); To turn this option on you would replace the OFF with ON. monitor dcd. If this option is on, then Pmcomm will monitor the presence of data carrier detect (DCD). To turn this option off the syntax would be: change_option("monitor dcd=OFF"); To turn this option on you would replace the OFF with ON. page length. This option allows you to set the ANSI page length from a script. Following is an example of how to set the page length to 25 lines. change_option("page length=25"); terminal. This option allows you to change the type of terminal from within a Pmcomm script. The following example would set the terminal type to ANSI. change_option("terminal=ANSI"); The available valid terminal types are TTY, ANSI, VT100 or VT220. foreground. This option allows you to change the foreground color from within a Pmcomm script. The available colors are: black blue green cyan red magenta brown white dark grey light blue light green light cyan light red pink yellow bright white The syntax to change the foreground color to cyan would be: change_option("foreground=cyan"); background. This option allows you to change the background color from within a Pmcomm script. The available colors are: black blue green cyan red magenta brown white dark grey light blue light green light cyan light red pink yellow bright white The syntax to change the background color to black would be: change_option("background=black"); echo. This option allows you turn on and off the local keystroke echo. The syntax to turn echo off would be: change_option("echo=OFF"); To turn this option on you would replace the OFF with ON. prefix1 prefix2 prefix3 These options allow you to change the dialing prefixes. For example to change prefix1 you would use the following syntax: change_option("prefix1=ATDT"); suffix1 suffix2 suffix3 These options allow you to change the dialing suffixes. For example to change suffix1 you would use the following syntax: change_option("suffix1=^M"); strip ansi. This option allows you to select if Pmcomm will strip the ANSI commands from a capture file. The syntax to turn off the stripping of the ANSI commands would be: change_option("strip ansi=OFF"); To turn this option on you would replace the OFF with ON. macro1 macro2 macro3 macro4 macro5 macro6 macro7 macro8 macro9 macro10 These options allow you to change the keyboard macros. For example to change macro1 you would use the following syntax: change_option("macro1=ATZ"); phone directory. To change the current phone directory the syntax would be: change_option("phone directory=c:\pmcomm\pmcomm.fon"); This would change the file used as the Pmcomm phone file. script directory. To change the current script directory the syntax would be: change_option("script directory=c:\pmcomm\script"); capture directory. To change the current capture file directory the syntax would be: change_option("capture directory=c:\pmcomm\capture"); chat. This option allows you to turn the Pmcomm chat mode on or off. The syntax to turn off chat mode is: change_option("chat=OFF"); To turn this option on you would replace the OFF with ON. auto cisb. This option allows you to turn the automatic CISB file transfer on or off. The syntax to turn off auto CISB is: change_option("auto cisb=OFF"); To turn this option on you would replace the OFF with ON. cisb recovery. This option allows you to turn the CISB file recovery on or off. The syntax to turn off the CISB file recovery is: change_option("cisb recovery=OFF"); To turn this option on you would replace the OFF with ON. baud. This option allows you to change the current baud rate. This will also change the default baud rate saved in the setup file. The syntax for this command is: change_option("baud=19200"); startup script. Use this command to change the name of the script that will be executed upon startup of Pmcomm. The syntax of this command is: change_option("startup script=c:\pmcomm\startup.scr"); exit on hangup. This command allows you to have Pmcomm exit once data carrier detect (DCD) has dropped. This will only work correctly if Monitor DCD is also selected. The syntax for this command is: change_option("exit on hangup=ON"); working directory. To change the current working directory the syntax would be: change_option("working directory=c:\pmcomm"); ═══ 11.3.23. 'C' dial ═══ dial("name"); This command will allow a script to dial a number listed in the current Pmcomm dialing directory. To dial the entry call Compu-Plane you would use the following syntax: dial("Compu-Plane"); ═══ 11.3.24. 'C' get_dial_memo ═══ get_dial_memo(char *returnstr); This command will retrieve the information stored in the memo field of the currently connected phone number. This will allow you to, for example, store your password in the dialing directory memo field, and write a script to use it. By doing this you can change your password without editing the script. All you would have to do is change the text in the memo field for that number. To retrieve the text stored in the current memo field the syntax would be: get_dial_memo (returnstr); ═══ 11.3.25. 'C' clipboard_paste ═══ clipboard_paste(char *returnstr); This command will retrieve text stored in the OS/2 clipboard. The maximum amount of text that can be retrieved at one time is 8192 bytes. To retrieve the text stored in the clipboard the syntax would be: clipboard_paste(returnstr); ═══ 11.3.26. 'C' clipboard_copy ═══ clipboard_copy(char *str); This command will copy text to the OS/2 clipboard. The maximum amount of text that can be sent at one time is 8192 bytes. To send text to the clipboard the syntax would be: clipboard_copy("This is a test"); ═══ 11.3.27. 'C' clipboard_append ═══ clipboard_append(char *str); This command will append text to the existing text in the OS/2 clipboard. The maximum amount of text that can be sent at one time is 8192 bytes. To append text to the clipboard the syntax would be: clipboard_append("This is a test"); ═══ 11.3.28. xmodem_send ═══ USHORT xmodem_send(char *filename); Example xmodem_send("d:\path\filename.ext"); Description This call will invoke the Xmodem_CRC send routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer box that it does when download is selected from the menu. Returns 1 if the transfer is successful and 0 if unsuccessful. ═══ 11.3.29. xmodem_receive ═══ USHORT xmodem_receive(char *filename); Example xmodem_receive("d:\path\filename.ext"); Description This call will invoke the Xmodem_CRC receive routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer box that it does when uploading from the menu. The file name specified must include a path. Returns 1 if transfer is successful and 0 if unsuccessful. ═══ 11.3.30. xmodem_chk_send ═══ USHORT xmodem_chk_send(char *filename); Example xmodem_chk_send("d:\path\filename.ext"); Description This call will invoke the Xmodem_Checksum send routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer box that it does when download is selected from the menu. Returns 1 if transfer is successful and 0 if unsuccessful. ═══ 11.3.31. xmodem_chk_receive ═══ USHORT xmodem_chk_receive(char *filename); Example xmodem_chk_receive("d:\path\filename.ext"); Description This call will invoke the Xmodem_Checksum receive routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer box that it does when uploading from the menu. The file name specified must include a path. Returns 1 if transfer is successful and 0 if unsuccessful. ═══ 11.3.32. xmodem_1k_send ═══ USHORT xmodem_1k_send(char *filename); Example xmodem_1k_send("d:\path\filename.ext"); Description This call will invoke the 1K-Xmodem send routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer box that it does when download is selected from the menu. Returns 1 if transfer is successful and 0 if unsuccessful. ═══ 11.3.33. xmodem_1k_receive ═══ USHORT xmodem_1k_receive(char *filename); Example xmodem_1k_receive("d:\path\filename.ext"); Description This call will invoke the 1K-Xmodem receive routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer box that it does when uploading from the menu. The file name specified must include a path. Returns 1 if transfer is successful and 0 if unsuccessful. ═══ 11.3.34. ymodem_send ═══ USHORT ymodem_send(USHORT num_files,CHAR **filearray); Example USHORT result; CHAR *filearray[2]; CHAR string1[80]; CHAR string2[80]; strcpy(string1,"pmcom106.zip"); strcpy(string2,"pmcom107.zip"); filearray[0] = string1; filearray[1] = string2; result = ymodem_send(2,filearray); Description This call will invoke the Ymodem send routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer box that it does when download is selected from the menu. As many as 8 files can be sent at one time. Returns Number of files successfully transferred. ═══ 11.3.35. ymodem_receive ═══ USHORT ymodem_receive(VOID); Example ymodem_receive(); Description This call will invoke the Ymodem receive routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer box that it does when uploading from the menu. Only a single file at a time will be accepted. Returns 1 if call is successful and 0 if unsuccessful. ═══ 11.3.36. ymodemg_send ═══ USHORT ymodemg_send(USHORT num_files, CHAR **filearray); Example USHORT result; CHAR *filearray[2]; CHAR string1[80]; CHAR string2[80]; strcpy(string1,"pmcom106.zip"); strcpy(string2,"pmcom107.zip"); filearray[0] = string1; filearray[1] = string2; result = ymodemg_send(2,filearray); Description This call will invoke the Ymodem-g send routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer box that it does when downloading from the menu. As many as 8 files can be sent at one time. Returns Number of files successfully transferred. ═══ 11.3.37. ymodemg_receive ═══ USHORT ymodemg_receive(VOID); Example ymodemg_receive(); Description This call will invoke the Ymodem-g receive routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer box that it does when uploading from the menu. Only one file at a time can be received. Returns 1 if call is successful and 0 if unsuccessful. ═══ 11.3.38. zmodem_send ═══ USHORT zmodem_send(USHORT num_files, CHAR **filearray); Example USHORT result; CHAR *filearray[2]; CHAR string1[80]; CHAR string2[80]; strcpy(string1,"pmcom106.zip"); strcpy(string2,"pmcom107.zip"); filearray[0] = string1; filearray[1] = string2; result = zmodem_send(2,filearray); Description This call will invoke the Zmodem send routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer box that it does when downloading from the menu. As many as 100 files may be transferred at one time. Returns Number of files successfully transferred. ═══ 11.3.39. zmodem_receive ═══ USHORT zmodem_receive(VOID); Example zmodem_receive(); Description This call will invoke the Zmodem receive routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer box that it does when uploading from the menu. Only one file at a time can be received. Returns The number of files transferred. ═══ 11.3.40. kermit_send ═══ USHORT kermit_send(USHORT num_files, CHAR **filearray); Example USHORT result; CHAR *filearray[2]; CHAR string1[80]; CHAR string2[80]; strcpy(string1,"pmcom106.zip"); strcpy(string2,"pmcom107.zip"); filearray[0] = string1; filearray[1] = string2; result = kermit_send(2,filearray); Description This call will invoke the Kermit send routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer box that it does when downloading from the menu. As many as 100 files may be transferred at one time. Returns Number of files successfully transferred. ═══ 11.3.41. kermit_receive ═══ USHORT kermit_receive(VOID); Example kermit_receive(); Description This call will invoke the Kermit receive routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer box that it does when uploading from the menu. Only one file at a time can be received. Returns Number of files transferred. ═══ 11.3.42. ascii_send ═══ USHORT ascii_send(char *filename); Example ascii_send("d:\path\filename.ext"); Description This call will invoke the ASCII send routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer box that it does when downloading from the menu. Returns 1 if transfer is successful and 0 if unsuccessful. ═══ 11.3.43. ascii_receive ═══ USHORT ascii_receive(filename); Example ascii_receive("d:\path\filename.ext"); Description This call will invoke the ASCII receive routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer box that it does when uploading from the menu. The file name specified must not include a path. Returns 1 if transfer is successful and 0 if unsuccessful. ═══ 11.3.44. cisb_send ═══ USHORT cisb_send(char *filename); Example cisb_send("d:\path\filename.ext"); Description This call will invoke the CISB send routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer box that it does when download is selected from the menu. Returns 1 if the transfer is successful and 0 if unsuccessful. ═══ 11.3.45. cisb_receive ═══ USHORT cisb_receive(char *filename); Example cisb_receive("d:\path\filename.ext"); Description This call will invoke the CISB receive routine, built into Pmcomm. Once issued the call will not return until the transfer either finishes or is aborted. Pmcomm will show the normal transfer box that it does when uploading from the menu. The file name specified must include a path. Returns 1 if transfer is successful and 0 if unsuccessful. ═══ 11.4. Sample Scripts ═══ These are scripts to help you, when you start to write your own scripts. ═══ 11.4.1. REXX Sample ═══ /* Sample Script*/ /* This script will allow you to log on to Compu-Plane once you change the strings stored in the variables called name and pass. Enter the sample.scr name for the script name of the Compu-Plane phone number, and change the name in the shell( ) function to the path and filename of this file.*/ Call RxFuncadd "init_dll","RxPmcomm","init_dll" /* This function registers the init_dll function with REXX. The init_dll function will register the rest of the functions in the rxpmcomm.dll. */ Parse arg port portname screen_handle dde_output dde_input semaphore /*These are the values that Pmcomm passes on the command line to an external program. These values can then be used in different REXX functions along with the rxpmcomm.dll functions. Following is the description of each value: */ /* port = The handle of the open communication port in Pmcomm */ /* portname = The name of the opened communication port ie.. COM1*/ /* screen_handle = Anything written to the handle will be printed on the Pmcomm screen. */ /* dde_input = This must be passed to most functions. It allows the rxpmcomm.dll function to communicate with Pmcomm. */ /* dde_output = This must be passed to most functions. It allows the rxpmcomm.dll function to communicate with Pmcomm. */ /* semaphore = This also must be passed to any file transfer function. It makes your REXX program wait until the transfer has been completed. */ Call init_dll /* Required before any other rxpmcomm.dll functions are called. */ /* Setup variables */ name = 'first;last' /* where first is your first name and last is*/ pass = 'password' /* your last name and password is your password.*/ cr = '0d'x Call read_timeout '20000',port /* This sets the read timeout for 20 seconds. This is used in the Wait_for, Wait_fore, and the Get_ch functions. */ Say 'Waiting for first name ...' /* This will be printed on the REXX screen. */ Do Forever Call Wait_fore 'name', 'password', 'continue?','?->', port, screen_handle /* This call will echo all characters to the Pmcomm screen that come from the open communication port. When one of the strings are matched the function will return the index of the matched string in the variable result. For example if it receives the string password then the result will be equal to 2. If the function waits longer then the read timeout value then result will be equal to 0. */ match = result Select When match=1 then Do Call Put_s name||cr,port Say 'Waiting for password ...' End When match=2 then Call Put_s pass||cr,port When match=3 then Call Put_s cr,port When match=4 then Exit Otherwise nop End End Say 'Script ended -' date( ) time( ) Exit ═══ 11.4.2. Internal Sample ═══ An example script to log onto a Multi-Net Communications BBS could be: wait_for ("first name"); puts ("john\n"); wait_for("last name"); puts("doe\n"); wait_for("password"); puts("password\n"); sleep (1000); puts("\n"); Scripts can be executed automatically when logging onto a BBS by specifying the script filename in the dialing directory for that phone number. You can execute a script from the File menu at anytime. ═══ 12. Installing Pmcomm Host Mode ═══ To install Pmcomm's Host Mode, change to the Pmcomm directory and run the host.exe program. The first prompt will ask you to enter the maximum baud rate of your modem. The next prompt will ask if you wish the baud rate to be fixed between the computer and the modem. As a rule of thumb, users with high-speed modems should choose "Y" at this point. Next, you must enter the path, including drive, of where you wish to install the Host Mode. When prompted, enter your first name, last name, and password. The install program automatically creates a password file in the necessary format. If this is an "open" system new users will be stored in this file automatically. If this is a "closed" system only the people that are registered in this file will be able to access the Host Mode. The six files that the install program creates are HOSTPASS.FLE, HOSTDIR.FLE, HOSTHEAD.FLE, HOST.SCR, HOSTNEWU.FLE, and HOSTHELP.FLE. The HOSTPASS.FLE file is where all of the users' names, passwords, securities, and last time on are stored. The HOSTDIR.FLE file is a list of the directories that have been created for the host mode. The HOSTHEAD.FLE file is the file that is displayed to users when they logon. The HOST.SCR file is the main executable script. The HOSTNEWU.FLE file is the file that is displayed to new users. In order for a user to be able to receive help from the menu, the HOSTHELP.FLE must contain the information that will be displayed. ═══ 13. Using the timer program ═══ The Timer program allows the user to automatically start Pmcomm at a certain time. The options allows the user to specify a name of a file to be passed on the command line. This would be used to pass a command line option to Pmcomm on startup. See Command_line_options. With the execution frequency option you can choose the days that you wish Pmcomm to automatically start. This option in conjunction with the time option sets up Pmcomm for automatic startup. If you have the timer program set up as an object on the desktop, make sure the working directory for that object is the directory that Pmcomm is installed in. ═══ 14. How To... ═══ This section gives you examples of how to set Pmcomm up to do different things. ═══ 14.1. How to make Pmcomm receive incoming calls. ═══ To make Pmcomm receive an incoming call without using the Host Mode, send the following command to the modem. ATS0=1 ═══ 14.2. How to Use Pmcomm with a modem pool. ═══ Because Pmcomm does not use ACDI, and will allow you to enter any valid 12 character name for a device, it will work with a shared serial port modem pool. This allows you to have modems on a server that users can access from their workstations. This can save a considerable about of money. First the ibmlan.ini file, on the Server and the Requesters, must be edited in order to operate Pmcomm in a modem pool. The "charwait" variable must be changed from it's default setting of 3600 to a setting of 3 and then re-boot the Server and all of the Requesters. The following is a flash from IBMLink on how to setup a modem pool using Pmcomm and Lan Server. The rest of this scenario concerns the OS/2 LAN Server definitions. When LAN Server definitions and actions are complete, defined users at any OS/2 Requestor can run the program from the OS/2 Public Applications Window. The serial port and modem at the LAN Server will be shared. To begin, logon as an administrator in the proper domain. Then follow instructions for the following: a. Defining the shared modem b. Defining the shared program files c. Defining the program as a public OS/2 application d. Defining the working directory e. Sharing the modem and the program f. Assigning the modem and the program to the users as they log on. DEFINING THE SHARED MODEM Follow this sequence: DEFINITION ALIASES SERIAL DEVICES --NEW-- (With cursor on --NEW--, press space bar to choose, press enter or click on ACTION) CREATE(Create a serial device alias - I used an alias of MODEM1, chose COM1 from the device pool using F4 for the list, and choose to share the port at server startup) *-----------------------------------------------------------* Create Alias - Serial Device Complete the panel; then Enter. Alias . . . . . . . . . . . . . . . MODEM1 Description . . . . . . . . . . . . Shared modem Server Name . . . . . . . . . . . . Chosen with the F4 key Server Device Pool. . . . . . . . . COM1 Priority. . . . . . . . . . . . . . 5 (chosen arbitrarily) Maximum number of users . . . . . . (Number of shared serial ports) When shared . . . . . . . . . > At server startup |-----------------------------------------------------------| ENTER Escape=Cancel F1=Help F4=List *-----------------------------------------------------------* DEFINING THE SHARED PROGRAM FILES Follow this sequence: DEFINITION ALIASES FILES --NEW-- (With cursor on --NEW--, press space bar to choose, press enter or click on ACTION) CREATE (Create the file alias) *---------------------------------------------------------* Create Alias - Files Complete the panel; then Enter. Alias . . . . . . . . . . . . . . . PMCOMM Description . . . . . . . . . . . . Program to access shared modem Server Name . . . . . . . . . . . . Chosen with the F4 key Server Path to Directory. . . . . . :OS2:ASYNC:PMCOMM Maximum number of users . . . . . . (left blank) When shared . . . . . . . . . > At server startup |---------------------------------------------------------| ENTER Escape=Cancel F1=Help F4=List *---------------------------------------------------------* DEFINING THE PROGRAM AS A PUBLIC OS/2 APPLICATION Follow this sequence: DEFINITION APPLICATION PUBLIC OS/2 APPLICATION --NEW-- (With cursor on --NEW--, press space bar to choose, press enter or click on ACTION) CREATE *----------------------------------------------------------* Create OS/2 Application Details Complete the panel; then Enter. Application ID. . . . . . . . . . . PMCOMMX Description . . . . . . . . . . . . Shared modem communications Program location. . . . . . . . . . Remote Drive or alias. . . . . . . . . . . PMCOMM Remaining path to program . . . . . : Command line. . . . . . . . . . . . PMCOMM.EXE Prompt used for parameters? . . . . NO Program type. . . . . . . . . . . . OS/2 PM |----------------------------------------------------------| ENTER Escape=Cancel F1=Help F4=List *----------------------------------------------------------* DEFINING THE WORKING DIRECTORY PMCOMM has support files that should reside in the working directory at the server. If this directory is not assigned, each user must have these files on their own disk. Follow this sequence: DEFINITION APPLICATION PUBLIC OS/2 APPLICATION --PMCOMMX-- (With cursor on --PMCOMMX--, press space bar to choose, press enter or click on ACTION) WORKING DIRECTORY *---------------------------------------------------------* Working Directory Complete the panel; then Enter. Working Directory . . . . . . . . . REMOTE Drive or alias. . . . . . . . . . . PMCOMM Remaining path to program . . . . . : Assigned Drive. . . . . . . . . . . P (chosen arbitrarily) |---------------------------------------------------------| ENTER Escape=Cancel F1=Help F4=List *---------------------------------------------------------* SHARING THE PROGRAM AND THE MODEM Follow this sequence: ACTION RESOURCE SHARING --PMCOMM-- (With cursor on --PMCOMM--, press spacebar to choose, press enter or click on ACTION) START SHARING --MODEM1-- (With cursor on --MODEM1--, press spacebar to choose, press enter or click on ACTION) START SHARING ASSIGNING RESOURCES TO USERS AS THEY LOG ON Follow this sequence for each user, to assign MODEM1 as a user logs on: DEFINITION USERS -- User -- (With cursor on the user name, press F10) LOGON SERIAL DEVICE ASSIGNMENTS Assign MODEM1 to a COM port Follow this sequence for each user, to copy the program to the user's START PROGRAMS window: DEFINITION USERS -- User -- (With cursor on the user name, press spacebar to choose, press enter or click on ACTION) PROGRAM STARTER --PMCOMMX-- (With cursor on --PMCOMMX-- press the spacebar to choose) ═══ 14.3. How to Use Pmcomm with IBMLink. ═══ If you have access to IBMLink (ask an IBM SE) you can use Pmcomm to call. The first thing you will need is a phone number that will work with Pmcomm. This type of number is called, an SS/EFS number. This stands for, Start Stop Enhanced Full Screen. It allows access to IBMLink through a 3708 protocol converter. To find a number in your area, ask your IBM SE, or order book number GC-34-22-34. It has a current list of all the public IBMLink phone numbers in it. Once you have the required phone number, you can add it to the Pmcomm dialing directory. You should set the Parity to Even, the Data bits to 7, and the Stop bits to 1. The terminal type should be set to VT220. Once connected you will see a prompt that asks you for your terminal type. If you press enter now it will display a list of available terminals. The best choice here is to select VT220, which is selection 18. By selecting VT220 you are able to use additional commands that are not available with VT100. If you select VT220 the first nine PF keys will be the numeric key pad keys (the num lock must be off). For example, PF1 will be the 1 on the key pad, PF2 will be 2 and so on. For PF10 it will be the F1 key, PF11 will be the F2 key and PF12 will be the F3 key. To do a reset press the Ctrl-R and to do a clear press the Ctrl-C. Once logged onto IBMLink just follow the prompts and you shouldn't have any problem. ═══ 14.4. How to Use Pmcomm with ESDTools. ═══ Once you are logged onto ESDTools and have selected the files you wish to receive, press the PF9 key (using VT220 this is the 9 on the numeric keypad). ESDTools will then ask you which drive you will be receiving the file to. Choose any drive as this parameter will be ignored by Pmcomm. You will then be prompted for the operating system, select OS/2. The last selection will be for the type of connection (i.e. Asynch etc...), select the appropriate connection type. ESDTools will then tell you not to press the enter key until prompted to do so by your communications software. At this time select Transfer, Download from the Pmcomm menu. Once the transfer has completed you can then press the enter key to return to the file list menu. ═══ 14.5. How to Use a REXX program as a script. ═══ A REXX program can be executed from Pmcomm by entering the name of the program name directly into the dialing_directory or from the start script menu. A REXX program can also be started by using the shell command in a macro. An example of this would be: shell("c:\pmcomm\plane.cmd"); This would execute the REXX script called plane.cmd. This allows you a quick and easy way to execute often used scripts. ═══ 14.6. How to Use drag and drop. ═══ When files are dragged from the file manager and dropped onto Pmcomm's terminal emulation screen, the transfer protocol that is listed for that phone number will be invoked and the file(s) will be sent to the remote computer. If you have Monitor_DCD selected then drag options will not be allowed until connected with another computer. To drag files from the file manager under OS/2 1.3, or drive object under OS/2 2.0, select a file (or files) and then click on the selected file(s) with the RIGHT mouse button and hold the button down. Once you have begun to drag the files with the mouse the mouse pointer will change shape. If the mouse pointer is over a program that does not accept drag and drop the pointer will again change shape. When the mouse pointer is over any part of Pmcomm you can release the right mouse button. This will drop the files onto Pmcomm and Pmcomm will send them. This will even work if Pmcomm is an icon. To change the protocol for the current phone number, select upload from the menu and then select the protocol you want (make sure that the save to dialing directory is selected). After pressing the OK button the file open dialog box will be displayed. Just press cancel and you can now use the drag and drop with the new protocol. If a file is dropped onto Pmcomm while it is an icon in a group menu, this file will be used as a setup file, and Pmcomm will be invoked. The drag and drop feature is also available for two of the buttons on the Button Bar. For more information see Button_Bar. ═══ 15. Troubleshooting. ═══ Following are some problems that may occur when using Pmcomm. ═══ 15.1. Device Open error. ═══ This message is displayed if Pmcomm can not open the specified device. If you are trying to open COM1, for example, and another program already has it open then this message will be displayed. If you are using the communication ports on the machine you are running Pmcomm on (not across a LAN). Then you must have the communication port device driver installed. For example, you should have a statement in your config.sys file, DEVICE=C:\OS2\COM.SYS. If not you will get the device open error. If you get this message when trying to access a communication port on a server, refer to the Modem_Pool section. One of the common problems is not first logging onto the network before trying to access the communication port. Also make sure you use Alias names that don't conflict with names on the local machine. For example don't try to use the name COM1 for the name of the remote communication port, if you have a COM1 on your local machine. Instead use a name like COM5, which normally will not be used on your local machine. ═══ 15.2. File transfers not available. ═══ If you have Monitor_DCD turned on under Port Options and Pmcomm does not detect DCD then the upload and download options will be greyed out. You can turn the Monitor DCD option off and you will then be able to transfer files. Some common reasons for Pmcomm not being able to detect are: Serial cable that does not support the DCD line. Modem not configured to have DCD follow the state of the phone line. Modem does not support DCD. The monitor DCD option should also be turned off if using Pmcomm with a modem pool. ═══ 15.3. Pmcomm will not dial out. ═══ The most common cause of this is a DOS program that has corrupted the communication port. Compiled basic program that are executed in the DOS box, for example, will sometime poll the available devices. When this happens the communication device driver is effected and Pmcomm will not be able to send information to the communication port. When this happens you will have to IPL (boot) the computer. ═══ 15.4. Typed characters do not echo to the screen. ═══ Some electronic information services, such as Genie, run in what is called "half-duplex" mode. When in this mode the typed characters are not echoed to the screen. Pmcomm's default mode is "full duplex" which lets the services, like Genie, echo the characters to the screen. To make Pmcomm echo the typed characters to the screen, select the Screen dialog box under the main Options menu and check local echo on. ═══ 15.5. Help not available. ═══ This message will be displayed if Pmcomm can not find the pmcomm.hlp file in the current directory. If you have Pmcomm installed in a Group menu make sure that you have the working directory set to the directory that Pmcomm is installed in. ═══ 15.6. Pmcomm locks with a shared serial port. ═══ If Pmcomm locks up when trying to access a shared serial port you must edit the ibmlan.ini file in the Server well as all of the Requesters. Change the variable "charwait" from its default of 3600, to 3 and then re-boot the Server and all of the Requesters. ═══ 15.7. No valid file names were passed. ═══ Under OS/2 2.0, you can only drag files from a drive object, when doing uploads. If you have a script as an object you can only drag that script if the script resides in your script directory.